Skip to content

Instantly share code, notes, and snippets.

View lkosak's full-sized avatar

Lou Kosak lkosak

  • Airbnb
  • San Francisco, CA
View GitHub Profile

ruby-1.9.3-p484 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p484 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@lkosak
lkosak / main.js
Created August 27, 2014 05:08
Gmail GitHub Mentions script
var my_teams = ["@airbnb/payments"]
var base_label = []
var my_teams_regex = new RegExp('(' + my_teams.join('|') + ')')
function GitHubThread(thread) {
this._thread = thread
// Determine why we got this message and label the thread accordingly.
//
@lkosak
lkosak / gist:6009a2c878257467adff
Created June 9, 2014 18:08
github enterprise gmail mentions
var my_teams = ["@airbnb/payments"]
var base_label = []
var my_teams_regex = new RegExp('(' + my_teams.join('|') + ')')
function GitHubThread(thread) {
this._thread = thread
// Determine why we got this message and label the thread accordingly.
//
@lkosak
lkosak / gist:8142ee47dc626928a718
Created May 9, 2014 00:13
vim rspec functions
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" RUNNING TESTS
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
map <leader>r :call RunTestFile("")<cr>
"map <leader>r :call RunTestFile("", "--tag wip")<cr>
map <leader>t :call RunTestFile(line("."))<cr>
function! ZeusRunning()
return findfile(".zeus.sock", getcwd()) == ".zeus.sock"
endfunction
@lkosak
lkosak / gist:2e57922a5a4615c34d7a
Created May 7, 2014 16:42
vim rspec functions
function! ZeusRunning()
return findfile(".zeus.sock", getcwd()) == ".zeus.sock"
endfunction
function! RunTestFile(line, ...)
let filename = expand("%")
if ZeusRunning()
let command = "zeus rspec"
else
@lkosak
lkosak / gist:6632546
Created September 20, 2013 02:17
hackpad client example
var Hackpad = require('hackpad');
var client = new Hackpad("client_id", "secret")
client.create("my new hackpad\n#hello!\n##subtitle\n[a link](http://www.alink.com)", "text/x-web-markdown", function(err, res){
console.log(err, res);
});
@lkosak
lkosak / gist:6617252
Last active December 23, 2015 09:49
basic vimrc
" Basic vim settings
set nocompatible
syntax on
set encoding=utf-8
set showmode
set showcmd
set hidden
set ruler
set smartindent
@lkosak
lkosak / pre-push
Created July 18, 2013 17:45
Drop this in ~/.git/hooks/pre-push and run chmod +x ~/.git/hooks/pre-pus!
#!/usr/bin/env ruby
local, remote = ARGV[0], ARGV[1]
address = remote.match(/git@(?<host>.*?):(?<account>.*?)\/(?<repo>.*?).git/)
branch = `git symbolic-ref HEAD`.strip.split('/').last
if(address[:host] == 'github.com' and branch != 'master')
puts "Pushing to http://github.com/#{address[:account]}/#{address[:repo]}/tree/#{branch}"
end
~ ❯ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Apr 22 2013 15:10:22)
MacOS X (unix) version
Included patches: 1-905
Compiled by lou@lkosak.local
Huge version without GUI. Features included (+) or not (-):
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float +mouse_urxvt -tag_any_white
-browse +folding +mouse_xterm -tcl
IM - Vi IMproved 7.3 (2010 Aug 15, compiled Apr 22 2013 15:10:22)
MacOS X (unix) version
Included patches: 1-905
Compiled by lou@lkosak.local
Huge version without GUI. Features included (+) or not (-):
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float +mouse_urxvt -tag_any_white
-browse +folding +mouse_xterm -tcl
++builtin_terms -footer +multi_byte +terminfo