Skip to content

Instantly share code, notes, and snippets.

@amckenna
amckenna / top.v
Last active July 19, 2018 22:46
FTDI Passthrough on Digilent Artix-7
module top
(
input wire clk,
input wire ftdi_rx,
output wire ftdi_tx,
input wire board_rx,
output wire board_tx,
output reg led = 1'b1
);

Keybase proof

I hereby claim:

  • I am amckenna on github.
  • I am amckenna (https://keybase.io/amckenna) on keybase.
  • I have a public key ASAPSppzy3_Xe0TjsfVGfzshnnne1HtEmShnN8z65DU46go

To claim this, I am signing this object:

@amckenna
amckenna / gist:86495f2fb268eec9c8879fbc1302167e
Created April 14, 2016 17:07
protecting against rm -rf
✔ ~
10:04 $ cd Downloads/
✔ ~/Downloads
10:04 $ mkdir temp
✔ ~/Downloads
10:04 $ cd temp/
✔ ~/Downloads/temp
10:04 $ ls
✘-1 ~/Downloads/temp
10:04 $ touch -- -@
get modulus with
openssl rsa -noout -modulus -pubin -in public.pub
======== maskpriv.py ======
#!/usr/bin/env python
import re
import sys
import gmpy
from math import floor, ceil
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@amckenna
amckenna / find_meetup_spot.py
Last active January 1, 2016 19:49
This is a script for finding the meeting point that is the closest between a number of possible addresses. The script works by taking a list of addresses weighted by the number of people at each each address and calculates the total mileage traveled by all individuals to all locations. Note: first you must create a text file called addresses.txt…
import requests
import json
import time
import operator
def load_addresses(file_name):
res = {}
with open(file_name,"r") as file:
tmp = file.read().strip().split("\n")
for t in tmp: