Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
Turtle

Andrew Gwozdziewycz apg

🐢
Turtle
View GitHub Profile
@apg
apg / gist:9fa689a97de91c658aca
Created Aug 26, 2015
transcript of a repl session to build a scanabanana
View gist:9fa689a97de91c658aca
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 Aug 29, 2015
banana scanimation, assuming you have the banana files.
View scanabanana.rkt
#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 Aug 29, 2015
Hack and Tell - Round 28
View round-28.md

-----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 Feb 13, 2014
ride the wave file, man.
View README
Compile:
$ LDFLAGS="-lm" make wavrider
Run:
$ ./wavrider < wavrider.c
$ mplayer output.wav
Wavrider will turn 40 characters into solid gold waves.
View gist:9229390
### 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:
View animate.sh
for n in {10..85}; do
./pixmaker -s $n -src ~/heartbleed.png ~/frame$n.png
done
gifme --reverse ~/Desktop/frame*.png
View wrapup-30.md

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

View gist:e4ab6203754ac7a5db43
Alicebot, Alicebot, does whatever an Alicebot does.
Likes to stand,
Loves to crawl,
Likes to eat, whatever she can.
Look out! Here comes Alicebot!
View match.py.md

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 Aug 29, 2015
Round 31
View round-31.md

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