This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
function x() { | |
echo $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hello | |
def `() | |
asdfas | |
end | |
def y | |
self.`() | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hello | |
def `() | |
asdfas | |
end | |
def y | |
`() | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
String k = ""; | |
String y; | |
y= 1 == 2 ? "" ; | |
k.substring(0); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hello | |
def x | |
end | |
def huh? | |
end | |
def z | |
end | |
def y | |
huh?? x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_{· | |
from deal | |
in_ GrouponDeals | |
where deal.lat == 38.8339 && deal.lng == -104.821· | |
select deal | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |