Skip to content

Instantly share code, notes, and snippets.

@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"
)
@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"
# 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")
x = "Akshay Gupta <kitallis@nilenso.com>, Aninda Kundu <aninda@nilenso.com>, Asif Kalam <asif@nilenso.com>, Jasim <jasim@nilenso.com>, Jithu Gopal <jithu@nilenso.com>, Neha Kumari <neha@nilenso.com>, Nivedita <nid@nilenso.com>, Nivedita Priyadarshini <nid@nilenso.com>, Prashant Karpe <prashant@nilenso.com>, Srihari Sriraman <srihari@nilenso.com>, Srushti Ambekallu <srushti@nilenso.com>, Steven Deobald <steven@nilenso.com>, Tejas Dinkar <tejas@nilenso.com>"
x.scan(/\<([^>]+)\>/).flatten.each do |str|
system "heroku sharing:add -r production #{str}"
end