Skip to content

Instantly share code, notes, and snippets.

Avatar
🚲
Hopefully outside

Ed Flanagan ed-flanagan

🚲
Hopefully outside
View GitHub Profile
@ed-flanagan
ed-flanagan / RacketSCIP.Dockerfile
Created Apr 4, 2021
Dockerfile example for Racket & SICP package
View RacketSCIP.Dockerfile
FROM debian:bullseye-slim
RUN \
apt-get update \
&& apt-get install --yes --no-install-recommends \
ca-certificates \
libjpeg62-turbo \
libpangocairo-1.0-0 \
openssl \
racket \
@ed-flanagan
ed-flanagan / end_all_pads.sh
Created Jun 22, 2017
End all Coderpad pads through API (requires jq)
View end_all_pads.sh
#!/usr/bin/env bash
if [ -z "${API_KEY}" ]; then
>&2 echo "Must set API_KEY!"
exit 1
fi
PAD_API="https://coderpad.io/api/pads"
PAD_PAGE=""
@ed-flanagan
ed-flanagan / git-flow-breakdown.md
Last active Jul 17, 2019 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.
View git-flow-breakdown.md

git-flow Breakdown

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master
@ed-flanagan
ed-flanagan / update_bundles.sh
Created Apr 13, 2017
Git pull all Pathogen Vim bundles
View update_bundles.sh
#!/usr/bin/env bash
BUNDLE_DIR="${HOME}/.vim/bundle"
if [ ! -d "${BUNDLE_DIR}" ]; then
echo >&2 "${BUNDLE_DIR} does not exist!"
exit 1
fi
for bundle in ${BUNDLE_DIR}/*/; do
@ed-flanagan
ed-flanagan / poweroffvms.sh
Last active Aug 24, 2016
Poweroff all running VirtualBox vms
View poweroffvms.sh
#!/usr/bin/env bash
vboxmanage list runningvms | awk '{print $2}' | tr -d '{}' | xargs -I '{}' vboxmanage controlvm {} poweroff
View questionable_archive_scrape.py
#!/usr/bin/env python3
'''Print list of all comics from http://questionablecontent.net/archive.php'''
import csv
import re
import sys
from urllib.error import HTTPError, URLError
from urllib.parse import urljoin
@ed-flanagan
ed-flanagan / config
Created Dec 16, 2015
Purdue CS lab machine SSH config file example
View config
# Replace `$USER` with your purdue career login
Host *.cs.purdue.edu
User $USER
PubkeyAuthentication yes
IdentityFile ~/.ssh/purdue_rsa
Host moore0* moore1* moore2*
HostName %h.cs.purdue.edu
User $USER
@ed-flanagan
ed-flanagan / ed-bira.zsh-theme
Created Oct 14, 2015
ZSH bira theme variation
View ed-bira.zsh-theme
# ZSH Theme based on bira (just color changes)
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local user_host='%{$terminfo[bold]$fg[red]%}%n%{$fg[cyan]%}@%{$fg[red]%m%}%{$reset_color%}'
local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}'
local rvm_ruby=''
if which rvm-prompt &> /dev/null; then
rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
else
if which rbenv &> /dev/null; then
@ed-flanagan
ed-flanagan / pantex.sh
Created Sep 19, 2015
Naive script to have pandoc convert markdown file to tex
View pantex.sh
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "usage:"
echo " pantex <filename>"
exit 1
fi
directory=$(dirname "$1")
filename=$(basename "$1")
@ed-flanagan
ed-flanagan / LICENSE
Last active Feb 19, 2020
Oren Tirosh’s mnemonic word list
View LICENSE
MIT License
Copyright (c) 2019 Ed Flanagan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: