Skip to content

Instantly share code, notes, and snippets.

View davidlee's full-sized avatar

David Lee davidlee

View GitHub Profile
󰀵 davidlee  ~/.config   09:30 
 tree nix*
nix
└── nix.conf
nix-darwin
├── flake.lock
└── flake.nix
2 directories, 3 files
@davidlee
davidlee / gist:81dea1165b09b707f7f9982f0940d17b
Last active December 15, 2016 08:19
What do developers mean by "technical debt"?
It has been aptly said that programming is the art of managing
complexity.
A large software project, in the best possible case, is understood as a
researcher understands a library. You may have read a number of the
books, and might even know a few of them intimately. If you want to find
a book – even one you've never seen before – it's usually easy as long
as you know the ISBN, the exact name, or at least the author.
You'll spend most of your time reading though, trying to find a clue or

Keybase proof

I hereby claim:

  • I am davidlee on github.
  • I am davidlee (https://keybase.io/davidlee) on keybase.
  • I have a public key whose fingerprint is 0433 586F 7628 709F 004E 1F41 73DA A8C6 0380 E33F

To claim this, I am signing this object:

@davidlee
davidlee / links
Created October 9, 2013 02:06
zeromq links
@davidlee
davidlee / rbenv-global.sh
Created May 15, 2012 07:49
rbenv-global.sh
#!/bin/bash
DEFAULT_VERSION='1.9.3-p194'
if [ -z "$1" ] ;
then
echo "Usage: ruby VERSION"
echo "Example: ruby $DEFAULT_VERSION"
echo "or, just wait a sec and we'll install $DEFAULT_VERSION"
sleep 2.5
fi
@davidlee
davidlee / MNEM spec
Created June 17, 2011 10:05
MNEM - the object database I'd quite like
;; This buffer is for notes you don't want to save, and for Lisp
;; evaluation. If you want to create a file, visit that file with C-x
;; C-f, then enter the text in that file's own buffer.
MNEM
An object database which stores and manipulates simple structures of
data (hashes, arrays, strings, and numbers), knows how to talk JSON,
keeps a copy of everything that has ever been entered, and implements
updates as pull requests.
@davidlee
davidlee / quickfind.rb
Created March 24, 2011 05:30
AR enums
module Quickfind
module ClassMethods
def quick_finder(field)
metaclass = class << self; self; end
klass = self
class_eval do
@@quickfinder = field
end
exportgems() {
export GEMPATH=`gem env gempath | sed 's/:.*$//'`/gems
}
exportgems;
# completion fuction for compdef: just lists the gems folders
_gems() { compadd `cd $GEMPATH; echo *` }
compdef _gems gcd ; gcd() { cd $GEMPATH/$1 }
@davidlee
davidlee / gist:637603
Created October 20, 2010 23:51
autoloads.rb
begin
require 'term/ansicolor'
rescue LoadError
end
module Kernel
def autoloads(lib_dir)
base_dir = File.expand_path File.join(Rails.root, lib_dir)
class Array
def columns(padding=1)
col_sizes = inject([]) do |sizes, row|
row.each_with_index.each do |col, i|
sizes[i] = [sizes[i], col.to_s.length].compact.max
end
sizes
end
out = []
each do |row|