Skip to content

Instantly share code, notes, and snippets.

View leongersing's full-sized avatar

Leon Gersing leongersing

  • South Florida
View GitHub Profile

Keybase proof

I hereby claim:

  • I am leongersing on github.
  • I am leongersing (https://keybase.io/leongersing) on keybase.
  • I have a public key ASCm5C67PkhnsNao62JcCxWMgrYIl6FFSbq778-_-VN59Ao

To claim this, I am signing this object:

@leongersing
leongersing / set.rb
Last active August 29, 2015 14:17
Function Sets in Ruby
set = ->(int){ int > -1000 && int < 1000 }
contains = ->(setFn, int){ setFn.(int) }
sset = ->(y){ ->(x){ x == y } }
union = ->(s1, s2){ ->(x){ s1.(x) || s2.(x) } }
intersect = ->(s1, s2){ ->(x){ s1.(x) && s2.(x) } }
diff = ->(s1, s2){ ->(x){ s1.(x) && !s2.(x) } }
filter = ->(s, p){ ->(x){ p.(x) && s.(x) } }
@leongersing
leongersing / ksw_opening.md
Created October 6, 2014 13:04
Keep Software Weird Opening "monologue"

Some have asked for this text so here it is. It is a re-phrasing of the opening to Fear and Loathing in Las Vegas. Enjoy!


We had two bags of grass, seventy-five pellets of mescaline, five sheets of high-powered blotter acid, a salt shaker half full of cocaine, and a whole galaxy of multi-colored uppers, downers, screamers and laughers. And as Jerry packed the first bowl and handed it to me I drew in a cloud of marijuana smoke held it deep, looked him in the eyes and exhaled the command: "let's ship some fucking software"

@leongersing
leongersing / pipe.js
Created October 3, 2014 15:33
I have a | in this gist.
function pipe(){
return "|";
}
asdf
@leongersing
leongersing / gist.js
Last active August 29, 2015 14:05
I'm a new Gist!
function foo{
return "foo".js;
}
foo();
foo();
function foo(){
return "foo";
}
x = 1
if x == 1:
print "x is 1."
-(void)setText:(NSString *)_text;