Skip to content

Instantly share code, notes, and snippets.

@timothyandrew
timothyandrew / README.md
Last active December 16, 2023 17:05
Set up a seedbox (on DigitalOcean – Ubuntu) really quick

Introduction

  • This script lets you set up and use a temporary DigitalOcean droplet to download torrent files.
  • Once downloaded, they can be streamed down to your local machine.
  • This uses transmission-cli for the torrent client, and nginx to serve files.

Setup on Local Machine

  • This assumes that you have a DigitalOcean account and tugboat set up, as well as seedbox-setup.sh present in the current directory.
@timothyandrew
timothyandrew / dns.go
Created July 29, 2022 14:46
Barebones Recursive DNS Resolver
package main
import (
"fmt"
"math/rand"
"os"
"github.com/miekg/dns"
)
@timothyandrew
timothyandrew / Brewfile.arm64
Last active March 17, 2023 02:02
Homebrew List
tap "adoptopenjdk/openjdk"
tap "benbjohnson/litestream"
tap "buildkite/buildkite"
tap "buildkite/cli"
tap "charmbracelet/tap"
tap "d12frosted/emacs-plus"
tap "filosottile/musl-cross"
tap "formulate-dev/tap"
tap "gscreen/gscreen", "git@github.com:gscreen/homebrew-gscreen"
tap "homebrew/bundle"
@timothyandrew
timothyandrew / bus.go
Created November 14, 2022 16:43
Build London Bus Dataset
package main
import (
"encoding/csv"
"encoding/json"
"fmt"
"io"
"log"
"os"
)
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
@timothyandrew
timothyandrew / screenshot.png
Last active February 4, 2019 18:08
Taskpaper Separators
screenshot.png
@timothyandrew
timothyandrew / pepperplate_export.py
Created August 28, 2018 06:25
Export Pepperplate database to Paprika YAML
import sqlite3
import requests
import yaml
import base64
conn = sqlite3.connect('/path/to/recipes_2.db')
conn.row_factory = sqlite3.Row
c = conn.cursor()
def downloadAsBase64(url):
(ns antonyms.core
(:gen-class)
(:require [clj-http.client :as client]))
(use 'clojure.java.io)
(defn process-file
"Call func once for with each line in filename"
[filename func]
(with-open [rdr (reader filename)]
(ns antonyms.core
(:gen-class)
(:require [clj-http.client :as client]))
(use 'clojure.java.io)
(defn antonym-for
[word]
(let [api-key "8c1e369f560ac4b0acfff71c674b37d6"
server-url (str "http://words.bighugelabs.com/api/2/" api-key "/" word "/json")