Skip to content

Instantly share code, notes, and snippets.

🦇
What a horrible night to have a curse.

Justin Miller justinian

View GitHub Profile
View linux-x64-nasm-cheatsheet.md

x64 NASM cheat sheet

Registers

64 bit 32 bit 16 bit 8 bit
A (accumulator) RAX EAX AX AL
B (base, addressing) RBX EBX BX BL
C (counter, iterations) RCX ECX CX CL
D (data) RDX EDX DX DL
@justinian
justinian / EDK2_2015_GUIDs-2017-04-27.csv
Created Mar 29, 2018 — forked from Velocet/EDK2_2015_GUIDs-2017-04-27.csv
EDK2 2015 GUIDs - Consolidated list of all *.dec/*.inf files as of 2017-04-27 (some duplicates removed)
View EDK2_2015_GUIDs-2017-04-27.csv
00000000-0000-0000-0000-000000000000 Zero
00000000-0000-0000-0000-000000000000 EfiPartTypeUnused
00000000-0000-0000-0000-000000000000 EfiTpmDeviceInstanceNone
00160F8D-2B35-4DF2-BBE0-B272A8D631F0 FirmwarePerformanceDxe
00214CC1-06D1-45FE-9700-DCA5726AD7BF ArmVirtPlatformLib
0049858F-8CA7-4CCD-918B-D952CBF32975 VirtioFdtDxe
0053D9D6-2659-4599-A26B-EF4536E631A9 ShellAlias
0065D394-9951-4144-82A3-0AFC8579C251 EfiPeiRscHandlerPpi
00720665-67EB-4A99-BAF7-D3C33A1C7CC9 EfiTcp4ServiceBindingProtocol
00C86DB8-013B-4FF4-B8E9-208F4FCF1C00 LibSignal
@justinian
justinian / update_keys.sh
Created Dec 12, 2017
Script to update SSH keys from Github
View update_keys.sh
#!/usr/bin/env bash
PROFILE=${1:-justinian}
USER=${2:-justin}
OUTFILE="/home/${USER}/.ssh/authorized_keys"
TEMPFILE=$(mktemp)
if curl -sL "https://github.com/${PROFILE}.keys" > "${TEMPFILE}"; then
if grep -q "ssh-rsa" "${TEMPFILE}"; then
@justinian
justinian / pillminder.ino
Created Feb 20, 2017
Pillminder Arduino Code
View pillminder.ino
#include <Adafruit_LEDBackpack.h>
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
#include <Wire.h>
const char* ssid = "xxxxxx";
const char* password = "xxxxxxx";
const char* host = "api.pushover.net";
const int httpsPort = 443;
@justinian
justinian / joindomain.sh
Created Jan 12, 2017
Join a Debian Jessie box to an AD domain
View joindomain.sh
#!/bin/bash
# This script should join Debian Jessie (8) to an Active Directory domain.
# Originally based on Alan D. Moore's script from his article "Joining Debian
# 8 to Active Directory"
# http://www.alandmoore.com/blog/2015/05/06/joining-debian-8-to-active-directory/
if [[ $1 == "--user" | $1 == "-u" ]]; then
shift
USER=`shift`
@justinian
justinian / sourceindex.md
Created Jan 9, 2017 — forked from baldurk/sourceindex.md
Source indexing for github projects
View sourceindex.md

Symbol Servers

I'm assuming you are familiar with symbol servers - you might not have one set up yourself for your own projects, but you probably use Microsoft's public symbol server for downloading symbols for system DLLs.

For your own projects it might be useful to set up a symbol server - I won't go into how you do that here since it's well documented elsewhere, but basically you just set up a folder somewhere - say X:\symbols\ or \servername\symbols or even http://servername.foo/symbols/ which has a defined tree structure:

symbols/
symbols/mymodule.pdb/
symbols/mymodule.pdb/123456789012345678901234567890122/
@justinian
justinian / awsexport.py
Created Nov 6, 2015
AWS credential exporter from .aws/credentials to environment vairables
View awsexport.py
#!/usr/bin/env python
import os
import os.path
from ConfigParser import SafeConfigParser
HOME = os.environ["HOME"]
CREDS = os.path.join(HOME, ".aws", "credentials")
def error(message):
@justinian
justinian / tmux.cheat
Last active Aug 29, 2015 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
View tmux.cheat
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@justinian
justinian / marquee.py
Created Jul 1, 2015
Python rainbow marquee
View marquee.py
#!/usr/bin/env python
import sys
colors = [160, 196, 202, 208, 214, 220, 226, 190, 154, 118, 46, 47, 48, 49, 51, 39, 27, 21, 57, 93]
ncolors = len(colors)
def reset():
sys.stdout.write("\033[?25h")
sys.stdout.write("\033[m")
View seeyouspacecowboy.sh
#!/usr/bin/env bash
# SEE YOU SPACE COWBOY by DANIEL REHN (danielrehn.com)
# Displays a timeless message in your terminal with cosmic color effects
# Usage: add "sh ~/seeyouspacecowboy.sh; sleep 2" to .bash_logout (or similar) in your home directory
# (adjust the sleep variable to display the message for more seconds)
# Cosmic color sequence
You can’t perform that action at this time.