Skip to content

Instantly share code, notes, and snippets.

#! /bin/bash
function x() {
echo $1
class Hello
def `()
asdfas
end
def y
self.`()
end
end
class Hello
def `()
asdfas
end
def y
`()
end
end
public static void main(String[] args) {
String k = "";
String y;
y= 1 == 2 ? "" ;
k.substring(0);
}
class Hello
def x
end
def huh?
end
def z
end
def y
huh?? x
@suryagaddipati
suryagaddipati / unique.clj
Created February 12, 2012 02:19
minimum from each each team
(defn incr-count [m x y]
(assoc m x (inc(get m x 0)) y (inc(get m y 0))))
(defn count-reducer [m team]
(let [[x y] team]
(incr-count m x y )))
(defn choose-winner [cmap , x , y] (if (> (get cmap x) (get cmap y)) x y ))
(defn unique-reducer [cmap]
@suryagaddipati
suryagaddipati / gist:1220480
Created September 15, 2011 21:03
rdio-lyrics
#!/usr/bin/ruby
MusixMatch::API::Base.api_key = <your key>
artist = %x[osascript -e 'tell app "Rdio" to get the artist of the current track']
song = %x[osascript -e 'tell app "Rdio" to get the name of the current track']
puts MusixMatch.i_m_feeling_lucky("#{artist} - #{song}")
_{·
from deal
in_ GrouponDeals
where deal.lat == 38.8339 && deal.lng == -104.821·
select deal
}
grouped_by_name = _{
from o
in_ Order
where ["second", "first"].member?(o.name)
order_by o.name
group_by o.name => :g
select :name => g.key , :orders => g.values
}
numbers = [ 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 ]
output = _{
from x
in_ numbers
where (x == 3 || x == 5 || x == 8) && ( x % 2) == 0
select x * 3
}
output.should == [24]