Skip to content

Instantly share code, notes, and snippets.

View al3xtjames's full-sized avatar

Alex James al3xtjames

View GitHub Profile
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 24, 2024 12:19
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@pawelszydlo
pawelszydlo / bt_pair_export.py
Last active July 6, 2022 10:22
Script to dump bluetooth pairing from OS X into a Windows registry file.
#!/usr/bin/env python
"""
Script for dumping Bluetooth pairings from OS X to a registry file, for Windows
import. This will allow you to have your Bluetooth devices paired with both
operating systems at the same time.
In case of problems with Windows registry entries: pair your device with Windows
first, then with OS X, and then do the dump and import.
Latest version can be found at:
@comex
comex / wormdump.c
Created April 9, 2015 06:07
Some old broken code in case it helps anyone
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/kern_event.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <net/ethernet.h>
@johnko
johnko / gist:66515a2db2aa22aa51bd
Last active November 26, 2021 17:16
How to iPXE boot from http iso on www.vultr.com

If your custom iso is not mounting, and your console is at an iPXE shell, you can:

initrd http://mfsbsd.vx.sk/files/iso/10/amd64/mfsbsd-se-10.1-RELEASE-amd64.iso

While the iso is downloading, vultr's iPXE does not include memdisk, so we have to upload it ourselves to another host.

Here's one I found public, though I wouldn't recommend using it: http://preseed.panticz.de/ipxe/memdisk

@0xbb
0xbb / README.md
Last active December 17, 2022 02:13
Macbook Pro 11,3 - Linux - AppleMuxControl reverse engineering
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@phette23
phette23 / current-dir-in-iterm-tab-title.sh
Last active January 4, 2024 10:20
Set the iTerm tab title to the current directory, not full path.
# put this in your .bash_profile
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND";
fi
# Piece-by-Piece Explanation:
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too
# the $PROMPT_COMMAND environment variable is executed every time a command is run
# see: ss64.com/bash/syntax-prompt.html