Skip to content

Instantly share code, notes, and snippets.

View yoni's full-sized avatar

Yoni Ben-Meshulam yoni

View GitHub Profile
$ rake test
(in ~/Projects/test)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I"lib:test" "/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I"lib:test" "/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I"lib:test" "/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
var http = require('http'),
express = require('express'),
connect = require('connect'),
url = require('url'),
fs = require('fs'),
io = require('../'),
sys = require('sys');
var app = require('express').createServer();
@yoni
yoni / gist:964929
Created May 10, 2011 17:14
numpy array string issue
>>> from numpy import array
>>> array([('abc',1,1.0)], dtype=[('name',str),('age',int),('grade',float)])
array([('', 1, 1.0)],
dtype=[('name', '|S0'), ('age', '<i8'), ('grade', '<f8')])
@yoni
yoni / gist:3426147
Created August 22, 2012 14:33
Hive "drop table" permissions error.
Contents of data.csv:
--------------------
joe.schmoe,73
bill.foo,31
john.smith,2
Contents of Hive script:
-----------------------
CREATE TABLE some_database.ages (
name STRING,
@yoni
yoni / test-all.Rout.fail.R
Created September 13, 2012 16:05
Test failures from rbundler package check.
R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-redhat-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
@yoni
yoni / gist:3758099
Created September 20, 2012 20:18
Jenkins Template Exception
Status Code: 500
Exception: java.lang.Error: hudson.util.IOException2: Transformation failed. Groovy template didn't produce a well-formed XML:
Stacktrace:
javax.servlet.ServletException: java.lang.Error: hudson.util.IOException2: Transformation failed. Groovy template didn't produce a well-formed XML:
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:616)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
@yoni
yoni / web2mp4.sh
Created May 3, 2013 03:24
Convert all WEBM files to MP4 using ffmpeg.
find . -name "*.webm" -exec ffmpeg -i {} -qscale 0 {}.mp4 \;
@yoni
yoni / webm2mp3.sh
Created May 3, 2013 03:32
Extract MP3 audio from all WEBM videos.
find . -name "*.webm" -exec ffmpeg -i {} -vn -ac 2 -ar 44100 -ab 320k -f mp3 {}.mp3 \;
@yoni
yoni / rmysql_install_error.R
Created May 10, 2013 17:21
Error installing RMySQL on OS X
R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i386-apple-darwin9.8.0/i386 (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
@yoni
yoni / split_lending_club_stats.sh
Created July 22, 2013 04:14
Splits the Lending Club summary file into it's parts
#!/usr/bin/env sh
LENDING_CLUB_FILE=$1
csplit -f LendingClubStats $1 '/^Loans that do not meet the current credit policy/'