Skip to content

Instantly share code, notes, and snippets.

View Jak12-3's full-sized avatar
💭
probably lollygagging

Jak12-3

💭
probably lollygagging
View GitHub Profile
@Jak12-3
Jak12-3 / nginx.sh
Created December 11, 2024 12:13
Cheatsheets in spaces I frequent
##############################################################################
# NGINX
# DOCUMENTATION: https://nginx.org/en/docs/
##############################################################################
sudo nginx -t # Check syntax
sudo systemctl status nginx # nginx current status
sudo systemctl reload nginx # Reload nginx
sudo systemctl restart nginx # Restart nginx
sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/ # Link website
@Jak12-3
Jak12-3 / HTML5.html
Created December 11, 2024 12:10
Cheatsheet
<!-- * *******************************************************************************************
* HTML5 Cheat sheet by Hackr.io
* Source: https://websitesetup.org/wp-content/uploads/2014/02/HTML-CHEAT-SHEET-768x8555.png
* ******************************************************************************************* * -->
<!-- Document Summary -->
<!DOCTYPE html> <!-- Tells the browser that HTML5 version of HTML to be recognized by the browser -->
<html lang="en"></html> <!-- The HTML lang attribute is used to identify the language of text content on the web. This information helps search engines return language specific results, -->
@Jak12-3
Jak12-3 / Walter White
Created November 30, 2024 16:39 — forked from WonderSwan/Walter White
So, you want to be a darknet drug lord...
So, you want to be a darknet drug lord...
by nachash
[email protected]
[The advice in this article can be adapted to suit the needs of other
hidden services, including ones which are legal in your jurisdiction.
The threat model in mind is that of a drug market. The tone is that of a
grandfather who is always annoyingly right, who can't help but give a
stream-of-consciousness schooling to some whippersnapper about the way
the world works. If this article inspires you to go on a crime spree and
@Jak12-3
Jak12-3 / README.openai-structured-output-demo.md
Created October 15, 2024 12:38 — forked from dannguyen/README.openai-structured-output-demo.md
A basic test of OpenAI's Structured Output feature against financial disclosure reports and a newspaper's police blotter. Code examples use the Python SDK and pydantic for the schema definition.

Extracting financial disclosure reports and police blotter narratives using OpenAI's Structured Output

tl;dr this demo shows how to call OpenAI's gpt-4o-mini model, provide it with URL of a screenshot of a document, and extract data that follows a schema you define. The results are pretty solid even with little effort in defining the data — and no effort doing data prep. OpenAI's API could be a cost-efficient tool for large scale data gathering projects involving public documents.

OpenAI announced Structured Outputs for its API, a feature that allows users to specify the fields and schema of extracted data, and guarantees that the JSON output will follow that specification.

For example, given a Congressional financial disclosure report, with assets defined in a table like this:

@Jak12-3
Jak12-3 / GetNordVPNWireGuardDetails.md
Created June 10, 2024 14:18 — forked from bluewalk/GetNordVPNWireGuardDetails.md
Getting NordVPN WireGuard details

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx

@Jak12-3
Jak12-3 / Allocate-GPUs-VM.ps1
Created April 21, 2024 15:19 — forked from ThioJoe/Allocate-GPUs-VM.ps1
PowerShell script to allocate and pass through GPU to Hyper-V Virtual Machine
# Script to easily set resource allocation for GPUs to be passed through into a Hyper-V VM
#
# Author: ThioJoe / https://github.com/thiojoe
#
### Instructions for copying drivers to VM - Will likely need to do this before running this script
# NOTE: Instead of manually copying the files, if you have an Nvidia GPU you can use my other script called "Copy-GPU-Drivers-VM.ps1" to do it automatically
# 1. Open C:\Windows\System32 on host machine and copy any files beginning with "nv" (Except nvspinfo.exe and NvAgent.dll , which are unrelated)
# 2. Place those files into the System32 folder on the VM
# 3. On the VM, create the following directory: C:\Windows\System32\HostDriverStore\FileRepository
# 4. For Nvidia GPUs, open C:\Windows\System32\DriverStore\FileRepository, copy any folders beginning with "nv_" (The number of folders should match the number of GPUs, or at least number of different models of GPU)
@Jak12-3
Jak12-3 / DisableUSBPowerManagement.ps1
Created April 21, 2024 15:15 — forked from ThioJoe/DisableUSBPowerManagement.ps1
PowerShell script to disable Windows power management on all currently connected serial ports, including most (if not all) USB devices and adapters.
# PowerShell script to disable Windows power management on all currently connected serial ports, including USB adapters
# In simpler terms, it prevents Windows from turning off connected serial devices to save power.
# Equivalent to right-clicking on a serial port device in Device Manager > Properties > "Power Management" Tab > Unchecking "Allow the computer to turn off this device to save power."
$hubs = Get-CimInstance -ClassName Win32_SerialPort | Select-Object Name, DeviceID, Description
$powerMgmt = Get-CimInstance -ClassName MSPower_DeviceEnable -Namespace root\wmi
foreach ($p in $powerMgmt) {
$IN = $p.InstanceName.ToUpper()
foreach ($h in $hubs) {
@Jak12-3
Jak12-3 / cheat.bat
Created April 21, 2024 15:14 — forked from ThioJoe/cheat.bat
"Cheat" Command Wrapper Script - Makes it easier to search specific terms with 'cheat' tool. Recommended to rename to "c.bat" for easy calling.
:: -----------------------------------------------------------------------------------------
:: Cheat Command Wrapper Script
:: -----------------------------------------------------------------------------------------
:: This batch script acts as a wrapper for 'cheat.exe', enhancing its functionality
:: by allowing more intuitive command-line interactions. Specifically, it:
::
:: 1. Directly accesses cheatsheets or tags with a single argument.
:: 2. Facilitates search within a cheatsheet using multiple arguments, treating them
:: as a single search query.
:: 3. Dynamically resolves the paths to the community and personal cheatsheets
@Jak12-3
Jak12-3 / Error-Lookup-Tool-Friendly.bat
Created April 21, 2024 15:12 — forked from ThioJoe/Error-Lookup-Tool-Friendly.bat
Error Lookup Tool Friendly Output
@echo off
:: Note: Lines beginning with "REM" or :: are comments
:: Script by: https://github.com/thiojoe
:: Purpose: Creates a much more user friendly output for the Microsoft Error Lookup Tool (err.exe). It parses the original output and modifies the text.
:: Usage: Just call the batch file with command prompt along with the error code the same as you would with err.exe
:: Example: error.bat 50
:: Recommended to rename this script to something shorter like 'error.bat'. Must be next to the lookup tool exe file.
@Jak12-3
Jak12-3 / README.md
Created April 14, 2024 12:41 — forked from acidtone/README.md
Git Activity: Configure a global .gitignore file

Configure a Global .gitignore file

.gitignore files list files and directories that Git shouldn't include when adding/committing to repos. These include files that your operating system uses to function properly (like file icons and display settings).

Complete the following steps to set your global .gitignore file for all repos on your system.

These steps were taken from: Configuring ignored files for all repositories on your computer

  1. Is your global .gitignore file already set up? The following shell command will print your settings for your .gitignore: