Skip to content

Instantly share code, notes, and snippets.

@blinsay
blinsay / gist:3218374
Created July 31, 2012 16:47
cascading.jruby test failures
1) Error:
test_create_union(TC_Aggregations):
NameError: no constructorfor arguments (cascading.flow.Scope) on Java::CascadingFlowPlanner::Scope
available overloads:
(java.lang.String)
(cascading.tuple.Fields)
(cascading.flow.planner.Scope)
/Users/benl/Projects/cascading.jruby/lib/cascading/scope.rb:10:in `copy'
/Users/benl/Projects/cascading.jruby/lib/cascading/assembly.rb:25:in `initialize'
/Users/benl/Projects/cascading.jruby/lib/cascading/assembly.rb:206:in `branch'
@blinsay
blinsay / gist:3232319
Created August 2, 2012 01:36
jruby whoops
benl@bivalve: jading$ hadoop jar jade.jar com.etsy.jading.Main fuckery.rb
Warning: $HADOOP_HOME is deprecated.
Aug 1, 2012 6:34:39 PM com.etsy.jading.Main run
INFO: Main.run() properties:
Aug 1, 2012 6:34:40 PM com.etsy.jading.Main run
INFO: JRUBY_HOME set to: /Users/benl/.rvm/rubies/jruby-1.6.5.1/
Aug 1, 2012 6:34:40 PM com.etsy.jading.Main run
INFO: cascading.jruby script ARGV:
Aug 1, 2012 6:34:41 PM com.etsy.jading.Main run
@blinsay
blinsay / jade
Created August 7, 2012 17:17
C.J and GEM_PATH
benl@bivalve: jading$ ./jade -g json -g jruby-openssl -l /Users/benl/Projects/cascading.jruby/sandbox/lib /Users/benl/Projects/cascading.jruby/sandbox/{fuckery,sleep,external}.rb && yes | gem uninstall cascading.jruby
Ivy dependencies already resolved
Buildfile: /Users/benl/Projects/jading/build.xml
[echo] Resolved?: true
download-ivy:
init-ivy:
retrieve-ivy:
>>> {k2:{k1: d[k1][k2]} for k1 in d for k2 in d[k1]}
{'numbers': {'this': {'one': 1, 'two': 2}}}
@blinsay
blinsay / crawl_maxgif.py
Created November 30, 2012 07:06
GIVE ME ALL OF YOUR GIFS
#!/usr/bin/env python
import os
import sys
import requests
import argparse
from urlparse import urlparse
from time import ctime, sleep
from bs4 import BeautifulSoup
@blinsay
blinsay / rancor.sh
Last active December 11, 2015 06:58
RANCOR
#!/bin/bash
echo "the rancor is coming do u hide? [Y/N/maybe]"
read hide
while [ "$hide" != "hide" ]
do
echo "y didn't u put the t-shirt on youre bewbs?"
done
In [1]: int(True)
Out[1]: 1
In [2]: True == 1
Out[2]: True
#!/usr/bin/env python
# encoding: utf-8
from eventlet import patcher, GreenPool
patcher.monkey_patch(all = True)
import sys
from eventlet.queue import Queue, Empty
from boto import connect_s3
@blinsay
blinsay / goenv.sh
Last active December 16, 2015 04:29
#!/bin/bash
# Apparently this doesn't work. :((((((((((((
_path_remove () { export PATH=`echo -n $PATH | awk -v RS=: -v ORS=: '$0 != "'$1'"' | sed 's/:$//'`; }
goenv() {
new_env=${1:-`pwd`}
old_env=$GOPATH
if [[ -z $old_env ]]; then
func Create(bot *core.Gobot) {
// matches is actually a map[string]string
matches, found := bot.Config.Plugins["matcher"]["matches"]
if !found {
log.Printf("Can't find matcher/matches plugin conf. Plugin will not run.")
return
}
switch matches := matches.(type) {
case map[string]interface{}: