Skip to content

Instantly share code, notes, and snippets.

View adelcambre's full-sized avatar

Andy Delcambre adelcambre

View GitHub Profile
Module.new do
def prepend(m=nil, &blk)
if block_given?
super(Module.new(&blk))
else
super
end
end
end.tap { |pre| Module.prepend pre }
@adelcambre
adelcambre / portland.md
Last active March 23, 2017 02:37
My Portland recomendations

Food to Not be missed in Portland

The "I go every time I'm there" category

  • Baan Thai - Small hole in the wall on the College campus, pretty much the best Thai Food I have found
  • Biwa - Awesome Japanese Izakaya place. I love this place so much and the owner Gabe is super nice. Get the Ramen unless it's about a million degrees. The Kara age is amazing too.
  • Bailey's Best beer spot in Portland. 20 rotating taps (almost) always from the west coast and mostly local to Portland. They never replace the a keg with the same beer so it's always a different lineup. Geoff and Michael know their shit so you can always ask for advice.
  • Bunk Sandwiches Some of the best sandwiches I've had. The pork belly bahn mi is to die for if they have it. They have a sister place called bunk bar that's open for dinner too, but I'm partial to the lunch only original.

#!/bin/sh
#/ Usage: clean-merged-branches
#/ Delete locally merged branches
set -e
# show usage maybe
[ "$1" = "--help" ] && {
grep '^#/' <"$0"| cut -c4-
exit 0
(defun open (project) (interactive (list (read-directory-name "Peepopen for project: " "~/code/")))
(flet ((textmate-project-root () (file-truename project)))
(peepopen-goto-file-gui)))
(global-set-key [(meta ?o)] 'open)

Keybase proof

I hereby claim:

  • I am adelcambre on github.
  • I am adelcambre (https://keybase.io/adelcambre) on keybase.
  • I have a public key ASCGxdjSqDDqvE2BatODQroZBMmL2Ocy9p66NgPIdGAnjAo

To claim this, I am signing this object:

git config --global alias.lol "log '--pretty=format:%C(yellow)%h%Creset %cr %C(red)%d%Creset %s' --graph --decorate --branches"
@adelcambre
adelcambre / server.rb
Created September 26, 2013 17:27
A small bit of code to demonstrate the Sockets API in Ruby via a very tiny, very bad, web server.
require 'socket'
NOT_FOUND = "HTTP/1.1 404 Not Found\nContent-Length: 9\n\nNot Found"
OK = "HTTP/1.1 200 OK\n"
socket = Socket.new(:INET, :STREAM)
sockaddr = Socket.sockaddr_in(11080, '127.0.0.1')
socket.bind(sockaddr)
socket.listen(5)
@adelcambre
adelcambre / foo
Last active December 20, 2015 02:29
asdf
asdf
asdf
asdf
asdf
asdf
def blah
"test"
end