Skip to content

Instantly share code, notes, and snippets.

@v64
v64 / metainfo.py
Created January 19, 2020 19:51
BitTorrent Metainfo SQLite DB
#!/usr/bin/env python3
import hashlib
import itertools
import os
import sqlite3
import urllib.parse
def main():
db = sqlite3.connect('./metainfo.db')
@v64
v64 / qsort.j
Created March 8, 2018 10:02
Quicksort in J
#!/Users/v64/.bin/j
NB. qsort is the implementation of the quicksort algorithm in J.
NB.
NB. With just two small modifications, the output of the algorithm
NB. can be changed to output a nested data structure illustrating
NB. the pivot points of the sort.
NB.
NB. Interesting demonstration about the strength of expressing
NB. algorithms this way.
@v64
v64 / create.sh
Created December 20, 2012 04:23
Scripted setup of an AWS micro instance webserver, takes a subdomain for a cname as an argument
#!/bin/bash
if [ ! $1 ]
then
echo "Subdomain argument is required"
exit
fi
export EC2_HOME="/your/path/to/ec2/tools"
export JAVA_HOME=$(/usr/libexec/java_home)