Skip to content

Instantly share code, notes, and snippets.

View JustinBrow's full-sized avatar

Justin JustinBrow

View GitHub Profile
@ericlaw1979
ericlaw1979 / Single.js
Last active October 21, 2025 19:04
SingleBrowserMode button for Fiddler.
// Rules > Customize Rules, place this just inside the HANDLERS class...
// Add a button to Fiddler's UI for "Single Browser Mode", where only one browser window will
// send its traffic to Fiddler.
public static BindUIButton("SingleBrowserMode \uD83D\uDC40")
function LaunchSingleInstance() {
// Tell the system we're not the proxy anymore
FiddlerApplication.UI.actDetachProxy();
// Launch a single browser instance pointed directly at Fiddler.
System.Diagnostics.Process.Start('msedge.exe',
@mmotti
mmotti / Set-DarkTheme.ps1
Last active October 9, 2025 20:06
Set Windows 11 to use Dark Mode. Particularly useful as part of a logon script for Windows Sandbox.
$strRegJson = @"
[
{
"RegPath": "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes",
"Name": "CurrentTheme",
"Type": "STRING",
"Value": "C:\\Windows\\resources\\Themes\\dark.theme"
},
{
"RegPath": "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\HighContrast",
@garg-aayush
garg-aayush / setup-personal-gpu-server.md
Created June 30, 2024 15:35
Step-by-Step Guide to setup your own personal GPU server

Setting Up Your Personal GPU Server: A Step-by-Step Guide

I've been using a GPU workstation with an RTX 4090 for almost a year now, and it's been one of the best decisions I've made. With a personal GPU server, you no longer need to rely on cloud-based GPU instances from services like RunPod or Vast.ai every time you want to run a job or try new models. The best part? No stress about recurring GPU instance costs! :-)

However, I rarely work directly on my workstation. Instead, I prefer the flexibility of accessing the GPU remotely using my MacBook, whether I'm working from different locations within my home, from a co-working space, or a cozy cafe in another part of town.

In this blog, I will walk you through the steps to configure a personal GPU Ubuntu server.

For this guide, I assume you already have a workstation running Ubuntu with a GPU and it is connected to your local network

@clod81
clod81 / encrypt.cs
Created January 21, 2024 21:44
C# DPAPI Example Usage
using System;
using System.Security.Cryptography;
using System.Text;
namespace Encrypt1
{
internal class Program
{
readonly static byte[] entropy = {}; //the entropy
@0xEva
0xEva / IDA Pro lumen.abda.nl public Lumina server.md
Last active November 4, 2025 08:28
Setting up IDA Pro to use lumen.abda.nl public Lumina server

Compiling socat on Cygwin

  1. Get a copy of socat source code here http://www.dest-unreach.org/socat/
  2. Make sure to install gcc-core, libssl-devel, make
  3. In your Cygwin terminal, run ./configure --enable-openssl-base --enable-openssl-method
  4. make optionally make install

Set up IDA Pro to use lumen.abda.nl public Lumina server

  1. Get a copy of lumen.abda.nl's certificate here https://abda.nl/lumen/hexrays.crt
  2. Change PATH_TO_IDA in ida_abda.nl_lumen.bat then run it
  3. Go to Options -> General -> Lumina, set server addr to 127.0.0.1, port 1234, Username guest, Password guest
@amigus
amigus / ByteCalculationFunctions.ps1
Last active November 26, 2024 21:11
Byte Calculation Functions; use: Invoke-Expression (&{curl -Ls https://mig.us/bcfps1 | Out-String}); (44040192 | bytesfromk | bytestogigs)
function ConvertFrom-BytesByFactor {
[CmdletBinding()]
param(
[Parameter(Mandatory)][int]$Factor,
[Parameter(Mandatory, ValueFromPipeline)][Int64]$Amount
)
process {
Write-Debug ("Rounding the result of $Amount * 1024 ^ $Factor")
[Convert]::ToInt64([Math]::Round($Amount * [Math]::Pow(1024, $Factor)))
}
@Yoticc
Yoticc / FreopenInCSharp
Created October 11, 2023 12:31
C# alternative for "freopen("CONIN$")"
void Main()
{
AllocConsole();
SetupIn();
SetupOut();
Console.WriteLine("Output something");
var input = Console.ReadLine();
}
@neggles
neggles / cuda-install-wsl2.sh
Last active September 26, 2025 13:28
WSL2 ubuntu 22.04 CUDA setup
#!/usr/bin/env bash
set -euo pipefail
# please don't run this script as an actual script. it's not remotely error checked. paste command blocks in one by one
# and make sure the output looks vaguely sane.
# remove this once you've read below!
echo "You didn't actually read the instructions, did you?"; exit 1
# first up, `sudo nano /etc/wsl.conf` and add this:
[boot]
@Yoticc
Yoticc / WAVWriter
Created August 29, 2023 07:23
WAVWriter
using System.Runtime.InteropServices;
/* Example start */
var data = new short[240000];
for (var i = 0; i < data.Length; i++)
data[i] = (short)((i % short.MaxValue) * 20);
var path = @"C:\a.wav";
var bytes = WAV.GetBytes(ChannelType.Mono, 44000, data);
@paultheman
paultheman / mac_keyremapping.md
Last active December 6, 2025 01:55
Guide on how to remap Keyboard keys on macOS

Guide on how to remap Keyboard keys on macOS

Update 17.10.2024: macOS 15 no longer requires root privileges for hidutil, you need to add hidutil and Terminal to 'Input Monitoring' in Settings/Privacy & Security tab.

Update 13.04.2024: On macOS 14.2 hidutil requires root privileges.

If you have a mac with an INT (ISO) keyboard you might want to change the ± key to ~. During my research I found that the information on this topic is not at all centralized. I prefer this option because it does not involve installing new software.

With macOS 10.12 Sierra Apple introduced hidutil as a tool to remap keyboard keys. See TN2450.