Skip to content

Instantly share code, notes, and snippets.

View ctborg's full-sized avatar
💭
{Status.NULL}

ctborg

💭
{Status.NULL}
View GitHub Profile
@dbrant
dbrant / dongle.asm
Last active February 6, 2026 02:23
Disassembly of hardware dongle code
0800:0000 1E PUSH DS // save ds, since we'll be setting it to 0
0800:0001 33C9 XOR CX,CX // cx = 0
0800:0003 8ED9 MOV DS,ECX // ds = 0
// Detect parallel port address (from bios data area)
0800:0005 BB0804 MOV BX,0408
0800:0008 B104 MOV CL,04 // try up to 4 addresses
0800:000A 8B17 MOV DX,WORD PTR [BX]
0800:000C 0BD2 OR DX,DX
0800:000E 7506 JNE 0016 // if (DX != 0) break;
@mwhite
mwhite / git-aliases.md
Last active February 9, 2026 11:08
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@rtomayko
rtomayko / optparse-template.rb
Last active June 3, 2023 03:16
Ruby optparse template
#!/usr/bin/env ruby
#/ Usage: <progname> [options]...
#/ How does this script make my life easier?
# ** Tip: use #/ lines to define the --help usage message.
$stderr.sync = true
require 'optparse'
# default options
flag = false
option = "default value"