Skip to content

Instantly share code, notes, and snippets.

View joebutler2's full-sized avatar
🎢
Fractional CTO and Coach

Joe joebutler2

🎢
Fractional CTO and Coach
View GitHub Profile
# TL;DR
puts method_find = [].method(:find)
# => #<Method: Array(Enumerable)#find>
if RUBY_VERSION =~ /^1.8/
[method_find.__line__, method_find.__line__]
else
method_find.source_location
end
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'ctrlp'
filetype plugin indent on
" vundle config end
<!DOCTYPE html>
<html>
<head>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js'></script>
<script>
$(document).ready(function(){
function debug(str){ $("#debug").append("<p>"+str+"</p>"); };
if(typeof WebSocket === 'undefined') {
alert("Your browser does not support websockets.")
}
[alias]
s = show
b = branch
ba = branch -a
ci = commit
cp = cherry-pick
cia = commit -a --amend
cim = commit -am
co = checkout
cob = checkout -b

thor install app_create.thor Make sure that the templates__generic_gemfile.erb is renamed and moved to ~/.thor/templates/generic_gemfile.erb

Then you can run thor list to verify that the script was installed successfully. If the command appears in the output, you should be good to run thor app:create APP_NAME.

var funcs = ['functionOne', 'functionTwo', 'functionThree'];
for(func in funcs) {
(function (func_name) {
window[func_name] = function () {
console.log('My name is ' + func_name);
}
})(funcs[func]);
}
functionOne();
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
WHITE="\[\033[1;37m\]"
BLACK="\[\033[0;30m\]"
OFF="\[\033[0m\]"
# Download git-completion from https://github.com/rtomayko/dotfiles/blob/rtomayko/.bash_completion.d/git-completion.bash
source /usr/local/etc/bash_completion.d/git-completion.bash
export PS1="$RED\$(~/.rvm/bin/rvm-prompt) $GREEN\w$YELLOW\$(__git_ps1 "[%s]")$OFF \$ "
build_package_patch_ruby_railsexpress() {
fetch_git rvm-patchsets git://github.com/skaes/rvm-patchsets.git master
for p in rvm-patchsets/patches/ruby/1.9.3/p550/railsexpress/* ; do
patch -p1 < $p
done
}
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
install_package "ruby-1.9.3-p550" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p550.tar.gz" patch_ruby_railsexpress autoconf standard
@joebutler2
joebutler2 / trouble-free-bundler.md
Created October 27, 2015 17:46 — forked from glv/trouble-free-bundler.md
This is a thing I wrote over a year ago for the internal LivingSocial wiki. There's nothing LS-specific about it, and it seems generally useful, so …

Trouble-Free Bundler

Every couple of weeks, I hear someone complaining about some difficulties with Bundler. Yesterday, it happened twice. But somehow I just never have those difficulties. I'm not saying Bundler is perfect; certainly in its early days it wasn't even close. But for the past two years it's been incredibly solid and trouble-free for me, and I think a large part of the reason is the way I use it. Bundler arguably does too much, and just as with Git, a big part of it is knowing what not to do, and configuring things to avoid the trouble spots.

@joebutler2
joebutler2 / mysql2-mojave.md
Created September 26, 2019 15:14 — forked from fernandoaleman/mysql2-mojave.md
Install mysql2 on MacOS Mojave

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

brew install openssl