Skip to content

Instantly share code, notes, and snippets.

View ltw's full-sized avatar

Lucas Willett ltw

View GitHub Profile

Keybase proof

I hereby claim:

  • I am ltw on github.
  • I am ltw (https://keybase.io/ltw) on keybase.
  • I have a public key whose fingerprint is 5A72 31D2 CA91 4525 3F9F 7ACE 1FB5 E1E6 7F97 AB9D

To claim this, I am signing this object:

@ltw
ltw / partial-git-checkout.sh
Created May 7, 2014 15:54
This is a rough first-pass implementation at a `git checkout` alias that matches on partial branch names. I'd ideally like to make this a little nicer and/or fuzzy-matching.
gcof () {
git branch | cut -c 3-1000 | grep $1 | head -1 | xargs git checkout
}
# $ git branch
# * master
# remember-the-fifth-of-november
# $ gcof fifth
# Switched to branch 'remember-the-fifth-of-november'
@ltw
ltw / places.md
Created May 25, 2014 04:14
Places my wife and I would like to visit at some point.

Places to Visit

USA

  • Alaska
  • California (north)
  • Colorado
  • Georgia
  • Hawaii (not main island)
  • Louisiana (New Orleans)
@ltw
ltw / supplemental_lectures.md
Created July 22, 2014 22:58
Supplemental lectures to give at DBC one day

Talks I'd like to give one day

  • the seven-layer OSI model of computing, and how that relates to debugging, latency, performance, and pain.
  • Why The Fuck Isn't The World Flat - a developer's guide to geospatial data.
  • Time, Asynchrony Other and Assumptions - a guide to linearizability, serializability, time-dependent occurrences and people, man. (aka Time Goes Backwards In Australia)
  • Introduction to Being Wrong - how to quickly realise you're wrong, and keep heading towards a solution.
@ltw
ltw / core.clj
Last active August 29, 2015 14:07
Matasano Clojure CLI Client
(ns matasano.core
(:require [clojure.tools.cli :as cli]
[matasano.challenge-1 :as c1]))
(def cli-options
[["-c" "--challenge CHALLENGE" "Challenge number"
:default 1
:parse-fn #(Integer/parseInt %)]])
(defn -main
var questions = [{
choices : [
{ name : "Answer One" }
{ name : "Answer Two" }
]
},
{}]
$("#questionTmpl").render(questions)
@ltw
ltw / group_maker.rb
Last active August 29, 2015 14:13
GroupMaker Pro™ (all props to @gfredericks)
require 'set'
names = [
# student names here
]
def get_group_set(coll)
if coll.count % 4 == 0
coll.each_slice(4).to_a
else
[coll[0..2]] + get_group_set(coll[3..-1])
@ltw
ltw / invisicomments.vim
Created January 19, 2015 01:29
Hide comments with a keystroke! (or four)
" Toggle comments as invisible
nmap <Leader>Ci :hi! link Comment Ignore<CR>
nmap <Leader>Cc :hi! link Comment Comment<CR>
@ltw
ltw / aly_skincare.md
Last active August 29, 2015 14:15
A good Combination skin routine.
  1. Switch cleanser to CeraVe Gentle Foaming Cleanser.
  2. Cleanse in the PM as well as AM.
  3. Switch moisturizer to CeraVe Moisturizing Cream (the white and blue tub)
  4. Moisturize in the PM, and cut down on the morning cleanses to only when it feels greasy.
  5. Add an AHA toner in between cleansing and moisturizing (when you feel you need it, and only in the PM) (Suggestion: Paula's Choice Hydralight Healthy Skin Refreshing Toner)
  6. Add a sunscreen that you like in the AM. (Suggestion: Neutrogena Ultra Sheer Dry-Touch Sunblock)
  7. Very shortly after (or before even), add a good makeup and sunscreen remover in the PM. (Suggestion: Paula's Choice Gentle Touch Makeup Remover)

Final Routine:

@ltw
ltw / hot.clj
Last active August 29, 2015 14:16 — forked from mattbaker/engima-encode.racket
(def encode
[reflector rotor-l rotor-m rotor-r letter]
(->> (letter-to-index letter)
(rotor-translate-left (rotate rotor-r 1))
(rotor-translate-left rotor-m)
(rotor-translate-left rotor-l)
(reflect reflector)
(rotor-translate-right rotor-l)
(rotor-translate-right rotor-m)
(rotor-translate-right (rotate rotor-r 1)