Skip to content

Instantly share code, notes, and snippets.

View 1000hz's full-sized avatar

Cina Saffary 1000hz

View GitHub Profile
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby-1.3.1.gem:
ERROR: Failed to build gem native extension.
/Users/cinas/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb --with-opt-include=/usr/local/include
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
checking for rb_thread_blocking_region()... yes
checking for RUBY_UBF_IO in ruby.h... yes
@1000hz
1000hz / gist:7894855
Created December 10, 2013 17:46
.bash_profile
export PATH=":/usr/local/share/npm/bin:~/bin:/usr/local/sbin:~/bin:/usr/local/bin:$PATH"
export JRUBY_OPTS="-J-XX:PermSize=512m -J-XX:MaxPermSize=768m -J-server -J-Xmx2048m -J-Xms1024m"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
#rvm use ruby-1.9.2-p180@spiceworks-app
rvm 1.9.3
source ~/.git-completion.bash
#display terminal colors by default
@1000hz
1000hz / nested_ternaries.js
Created April 18, 2014 20:21
Nested ternaries can be nice if you do it right...
function dessertRank(dessert) {
return dessert === "muffins" ? "good"
: dessert === "brownies" ? "pretty good"
: dessert === "cupcakes" ? "great"
: dessert === "cookies" ? "amazing"
: dessert === "cake" ? "omg"
: dessert === "ice cream" ? "dying"
: "probably pretty great"
@1000hz
1000hz / dogify.js
Last active January 16, 2017 07:46
i18n for dogs
{
const random = (min, max) => {
if (min === undefined && max === undefined) return Math.random()
if (max === undefined) {
max = min
min = 0
}
return ~~(Math.random() * max) + min
}