This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am perks on github. | |
* I am perks (https://keybase.io/perks) on keybase. | |
* I have a public key ASCvQmDWdl8ZOgxJHysgGmOZLnXn_x3qsjlMTkzcHaGwGQo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |
I hereby claim:
- I am perks on github.
- I am perks (https://keybase.io/perks) on keybase.
- I have a public key ASCvQmDWdl8ZOgxJHysgGmOZLnXn_x3qsjlMTkzcHaGwGQo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from M2Crypto import BIO, RSA | |
import base64 | |
def der_length(length): | |
"""DER encoding of a length""" | |
if length < 128: | |
return chr(length) | |
prefix = 0x80 | |
result = '' | |
while length > 0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main(int argc, char *argv[]) { | |
char *ptr; | |
if(argc < 3) { | |
printf("Usage: %s <environment variable> <target program name>\n", argv[0]); | |
exit(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\x89\xc2\xb0\x0b\xcd\x80" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# This script is for controlling OSX v5.7.4 tftpserver | |
case "$1" in | |
'start') | |
launchctl load -F /System/Library/LaunchDaemons/tftp.plist | |
launchctl start com.apple.tftpd | |
echo "tftpserver started..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00:00:00 | |
00:00:01 | |
00:00:02 | |
00:00:03 | |
00:00:04 | |
00:00:05 | |
00:00:06 | |
00:00:07 | |
00:00:08 | |
00:00:09 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INTERFACE=en0 | |
OUI="/opt/local/etc/oui.txt" | |
OUI_LEN=19004 | |
while [ true ]; do | |
STATUS=`ifconfig ${INTERFACE} | grep status: | awk '{print $2}'` | |
if [ "$STATUS" = "inactive" ]; then | |
R=$(((RANDOM % ${OUI_LEN})+1)) |