Skip to content

Instantly share code, notes, and snippets.

View apg's full-sized avatar
🐢
Turtle

Andrew Gwozdziewycz apg

🐢
Turtle
View GitHub Profile
@apg
apg / gist:9fa689a97de91c658aca
Created August 26, 2015 00:44
transcript of a repl session to build a scanabanana
Welcome to Racket v6.1.
racket@> (require racket/draw)
racket@> (define files (for/list
[(i (in-range 7))]
(format "/tmp/banana/banana~a.png" i)))
racket@> files
'("/tmp/banana/banana0.png"
"/tmp/banana/banana1.png"
"/tmp/banana/banana2.png"
"/tmp/banana/banana3.png"
@apg
apg / scanabanana.rkt
Created August 29, 2015 00:25
banana scanimation, assuming you have the banana files.
#lang racket/base
(require racket/draw
racket/gui)
(define files (for/list [(i (in-range 7))]
(format "/tmp/banana/banana~a.png" i)))
(define bitmaps (map (lambda (x) (read-bitmap x)) files))
(define dcs (map (lambda (x) (new bitmap-dc% [bitmap x])) bitmaps))
@apg
apg / round-28.md
Last active August 29, 2015 13:56
Hack and Tell - Round 28

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Hate markdown? See this in all its rendered glory.

Round 28: Jeepy Gee

Hello Hackers-

Thanks to Meetup for hosting us! As always

@apg
apg / README
Created February 13, 2014 07:18
ride the wave file, man.
Compile:
$ LDFLAGS="-lm" make wavrider
Run:
$ ./wavrider < wavrider.c
$ mplayer output.wav
Wavrider will turn 40 characters into solid gold waves.
### Keybase proof
I hereby claim:
* I am apg on github.
* I am apg (https://keybase.io/apg) on keybase.
* I have a public key whose fingerprint is B658 B173 C61E A483 C0D0 1E9D 288E DB47 3361 6035
To claim this, I am signing this object:
@apg
apg / animate.sh
Last active August 29, 2015 14:00
for n in {10..85}; do
./pixmaker -s $n -src ~/heartbleed.png ~/frame$n.png
done
gifme --reverse ~/Desktop/frame*.png

Round 30: Things We Say

Hello Hackers.

Thank you to The Ladders for hosting Round 30, and providing pizza and alcohol. Not unlike any other company in NYC, they're hiring, and because they were so nice to us, we repeat that here. They've hired a few Hacker Schoolers, none of which run away, which says something good about their culture. Reach out to John Connolly if you're interested: jeconnol@gmail.com

Projects

Aditya Mukerjee

Alicebot, Alicebot, does whatever an Alicebot does.
Likes to stand,
Loves to crawl,
Likes to eat, whatever she can.
Look out! Here comes Alicebot!
@apg
apg / match.py.md
Created May 22, 2014 02:43
match thing

Many years ago, Marius Eriksen wrote asome code to do pattern matching in Python. I quickly forked the code and had envisioned expanding upon it by "fixing" the interface, and making it possible to dispatch functions with it like the Erlang example he provided.

Like most of my ambitions of this type, it never happened, and despite the fact that I had forked the repo it went completely untouched. In the mean time, though, I had played with with, on numerous occassions, experiments that were fueled by my inability to properly extend the language without diving into it's internals.

But, recently, I had a little bit of time to spare while waiting for a meeting, and so, I made an attempt at providing pattern matched function dispatch to Python.

With it, Marius's example looks

@apg
apg / round-31.md
Last active August 29, 2015 14:02
Round 31

Round 31: Free. Functional and Secure...

Hello hackers,

Thanks to eBay for hosting us again! eBay always provides a great atmosphere and enough pizza and beer to satisfy everyone. As is standard affair in NYC, they're likely hiring!

Projects Presented (in pseudo-random order)

Nick Kersting