Skip to content

Instantly share code, notes, and snippets.

View bethanylong's full-sized avatar
👩‍💻
Hackalackin'

Bethany Long bethanylong

👩‍💻
Hackalackin'
View GitHub Profile
@bethanylong
bethanylong / transforming_hello.c
Created October 18, 2016 22:25
"Hello world" demo program for gdb talk
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
const int BUFSIZE = 1024;
const int ARBITRARY_THRESHOLD = 3;
int is_uppercase(char ch) {
return ch >= 'A' && ch <= 'Z';
}
from subprocess import Popen, PIPE, STDOUT
import subprocess
import math, sys
from time import sleep
from os import path, access, W_OK, R_OK, F_OK
def cut(movie, start, clip):
subprocess.Popen(["ffmpeg", #Calls ffmpeg program
"-ss",str(start), #Begining of recording, must be string
"-t", '30', #How long to record clip for, must be a string
set prompt="C:`pwd | sed -e 's_/_\\\\_g'`> "
alias cls clear
alias dir ls
alias cmd csh
alias del rm
alias copy cp
alias mklink ln
alias ipconfig ifconfig
alias ren mv
@bethanylong
bethanylong / beacon.c
Created February 24, 2015 06:57
Sample beacon frame sent over mon0
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <netpacket/packet.h>
#include <net/ethernet.h>
#include <netdb.h>
### Keybase proof
I hereby claim:
* I am bethanylong on github.
* I am bethanylong (https://keybase.io/bethanylong) on keybase.
* I have a public key whose fingerprint is F382 CAEE 92AC FFEE 172F 9308 183F 1562 09E9 E166
To claim this, I am signing this object:
@bethanylong
bethanylong / diagonal-line-generator.py
Created February 12, 2014 23:46
Diagonal line generator (inspired by portsnap)
#!/usr/bin/env python
import sys
import time
for n in range(0, 10000):
try:
if n % 10 == 0:
sys.stderr.write(str(n))
time.sleep(0.01)
@bethanylong
bethanylong / simple_knit.py
Created January 25, 2014 01:14
Simple knitting pattern toy
#!/usr/bin/env python
import sys
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Simple knitting pattern toy')
parser.add_argument('--knit', '-k', dest='knit', type=str, default="V",
metavar='CHAR', help='character for knit stitches')
parser.add_argument('--purl', '-p', dest='purl', type=str, default=":",