Skip to content

Instantly share code, notes, and snippets.

View nmarley's full-sized avatar
🦀
我想吃一點點東西。

Nathan Marley nmarley

🦀
我想吃一點點東西。
View GitHub Profile
@nmarley
nmarley / ptree.h
Created January 9, 2016 05:48 — forked from m-mizutani/ptree.h
Patricia Tree Template in C++
#ifndef __PTREE_H__
#define __PTREE_H__
#include <sys/types.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@nmarley
nmarley / bitwalletrecover.py
Created April 1, 2016 15:09 — forked from UdjinM6/bitwalletrecover.py
bitwalletrecover.py - recover compressed private keys from your bitcoin/litecoin/darkcoin wallet. Requires python3, pycoin (https://pypi.python.org/pypi/pycoin), and base58 (https://pypi.python.org/pypi/base58).
## bitwalletrecover.py - recover private keys from your darkcoin wallet
## (this version was not tested with bitcoin/litecoin).
## Requires python3, pycoin (https://pypi.python.org/pypi/pycoin),
## and base58 (https://pypi.python.org/pypi/base58).
##
## Starting with Python 3.4, pip is included by default with the Python binary
## installers. To install pip for older versions 3.x:
##
## sudo apt-get install python3-setuptools
## sudo easy_install3 pip
@nmarley
nmarley / bitcoin_spv_wallet_overview.md
Created March 14, 2017 16:46 — forked from TOMOAKI12345/bitcoin_spv_wallet_overview.md
Bitcoin SPV Wallet Flow Overview

@nmarley
nmarley / Effective_Engineer.md
Last active February 8, 2018 02:21 — forked from rondy/Effective_Engineer.md
Effective_Engineer.md

FWIW: I didn't produce the content present here. I've just copy-pasted it from somewhere over the Internet, but I cannot remember exactly the original source. I was also not able to find the author's name, so I cannot give him/her the proper credit.


Effective Engineer - Notes

What's an Effective Engineer?

#!/bin/bash
AWS_COMMAND="aws --profile ion"
SERVICE="$1"
if [ "x$SERVICE" = "x" ]; then
SERVICE=bunsen
echo "INFO: Using default service [$SERVICE]"
fi
echo "Looking up service [$SERVICE]"
@nmarley
nmarley / mcsentinel.py
Last active February 8, 2018 02:24 — forked from tgflynn/mcsentinel.py
mcsentinel.py - Sentinel scheduler by Tim Flynn
#!/usr/bin/env python
import os
import sys
import math
import random
NSECONDS = 5*3600
NNODES = 4000
@nmarley
nmarley / facebook-contact-info-summary.rb
Created March 23, 2018 03:44 — forked from dylanmckay/facebook-contact-info-summary.rb
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It dumps all cell phone call + SMS message + MMS records, plus a summary of each.
#
# Place this script inside the extracted Facebook data download folder
# alongside the 'html' folder.
#
@nmarley
nmarley / facebook-contact-info-summary.rb
Created March 23, 2018 03:44 — forked from dylanmckay/facebook-contact-info-summary.rb
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It dumps all cell phone call + SMS message + MMS records, plus a summary of each.
#
# Place this script inside the extracted Facebook data download folder
# alongside the 'html' folder.
#
@nmarley
nmarley / .profile
Created June 25, 2018 01:08 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@nmarley
nmarley / curl-websocket.sh
Created September 8, 2017 09:50 — forked from htp/curl-websocket.sh
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/