Skip to content

Instantly share code, notes, and snippets.

debug(:language)
whence(:language => "english") { '1' }
whence(:language => 'spanish') { '2' }
whence(:language => 'unknown') { nil }
test( {:language => "english"} => "1",
{:language => "spanish"} => "2")
#!/usr/bin/env ruby
# Take the "combined.csv" file, and reorganize and annotate it into the
# finished data file that the group wants.
require 'date'
require 'logger'
require 'rubygems'
require 'fastercsv'
➜ ~ rvm install 1.9.1
info: Installing Ruby from source to: /Users/clinton/.rvm/rubies/ruby-1.9.1-p378
info: /Users/clinton/.rvm/src/ruby-1.9.1-p378 has already been extracted.
info: Configuring ruby-1.9.1-p378, this may take a while depending on your cpu(s)...
info: Compiling ruby-1.9.1-p378, this may take a while depending on your cpu(s)...
[2010-07-14 16:52:37] make
main.c: In function ‘objcdummyfunction’:
main.c:19: warning: implicit declaration of function ‘objc_msgSend’
main.c: At top level:
main.c:19: warning: ‘objcdummyfunction’ defined but not used
eval.c: In function ‘ruby_cleanup’:
eval.c:139: warning: passing argument 1 of ‘ruby_init_stack’ discards qualifiers from pointer target type
gc.c: In function ‘garbage_collect_with_gvl’:
gc.c:597: warning: cast from pointer to integer of different size
w: illegal option -- L
[2010-07-14 17:05:36] make
gcc -O2 -g -Wall -Wno-parentheses -fno-common -pipe -fno-common -L. -L/usr/local/lib main.o dmydln.o dmyencoding.o miniprelude.o array.o bignum.o class.o compar.o complex.o dir.o enum.o enumerator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o object.o pack.o parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o strftime.o string.o struct.o time.o transcode.o util.o variable.o version.o compile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o dmyext.o -lpthread -ldl -lobjc -o miniruby
rbconfig.rb unchanged
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./enc/make_encmake.rb --builtin-encs="ascii.o us_ascii.o unicode.o utf_8.o" --builtin-transes="newline.o" enc.mk
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb -I. -rrbconfig ./tool/compile_prelude.rb ./prelude.rb ./en
[2010-07-19 17:25:46] ./installer -a /Users/clinton/.rvm/rubies/ree-1.8.7-2010.02 --dont-install-useful-gems
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
eval.c: In function ‘rb_eval_string_wrap’:
eval.c:1775: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘rb_eval_cmd’:
eval.c:1916: warning: assignment discards qualifiers from pointer target type
@judy-zz
judy-zz / centredaily.com.js
Created May 18, 2012 14:24
Cleans up the CDT! Removes comments (which are disgusting), and the ads (which are annoying and detract from the content.)
// Clean up the CDT!
// Comments
$("#commentingStage").hide();
// Ads
$("#wgt_fnscombo").hide();
$("#widget_bundle").hide();
$(".ad").hide();
$("#header_r1").hide();
@judy-zz
judy-zz / variables.css.less
Created June 18, 2012 03:45
Solarized colors for Twitter Bootstrap
@black: #002b36;
@grayDarker: #586e75;
@grayDark: #657b83;
@gray: #839496;
@grayLight: #93a1a1;
@grayLighter: #eee8d5;
@white: #fdf6e3;
@blue: #2aa198;
@blueDark: #268bd2;
@judy-zz
judy-zz / authenticate_fitbit.rb
Last active December 11, 2015 17:08
Load data from Livestrong MyPlate (or any other source) into FitBit.
require 'oauth'
require 'launchy'
require 'yaml'
require_relative 'weights'
@consumer = OAuth::Consumer.new ENV['FITBIT_KEY'], ENV['FITBIT_SECRET'],
{:site=>"https://api.fitbit.com"}
@request_token = @consumer.get_request_token
@auth = {}
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by DHCP configure 4.2.5-P1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/isc-dhcp/4.2.5-P1 --localstatedir=/usr/local/var/dhcpd
## --------- ##
## Platform. ##