Skip to content

Instantly share code, notes, and snippets.

View apg's full-sized avatar
🐢
Turtle

Andrew Gwozdziewycz apg

🐢
Turtle
View GitHub Profile
#lang racket/base
;; Roughly based on the PLaneT package by Dave Herman,
;; Originally released under MIT license.
;; edited: Matthias, organization in preparation for pretty-print
;; -----------------------------------------------------------------------------
;; SERVICES
#!/bin/sh
if [[ -z "$1" ]]; then
echo "usage: $0 <key>"
exit 1
fi
curl -X POST -d "key=$1" https://yubi-expire.herokuapp.com/
echo
<html>
<body>
<a href="javascript:(function(v){if (v) {var r = prompt('Playback rate?');var f = parseFloat(r);v.playbackRate = f;}})(document.querySelector('video'))">Video Speedup</a>
</body>
</html>
### ====================================================================
### @Awk-file{
### author = "Nelson H. F. Beebe",
### version = "1.06",
### date = "24 October 1997",
### time = "21:34:34 MDT",
### filename = "man2html.awk",
### address = "Center for Scientific Computing
### University of Utah
### Department of Mathematics, 105 JWB
@apg
apg / soklevel.c
Last active January 6, 2017 23:57
dirt simple sokoban game supporting 8x8 boards.
/**
* soklevel.c: dirt simple sokoban ASCII > sokobon.c compatible
* level editor.
*
* Copyright 2017: Andrew Gwozdziewycz <me@apgwoz.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
package main
import (
"flag"
"image"
"image/color"
"image/draw"
_ "image/jpeg"
png "image/png"
"log"
@apg
apg / capture.sh
Last active August 24, 2016 22:39
fork of Kgif, to make it more generalized. Repo coming https://github.com/luminousmen/Kgif
#!/bin/sh
# capturing delay
SCROT_DELAY=0.5
# delay in gif
GIF_DELAY=10
# clean tmp directory
ctrlc() {
echo "\nStop capturing"
@apg
apg / chunkit.sh
Created August 9, 2016 19:24
Upload chunks to chunk.io (use - for STDIN)
#!/bin/sh
URL=$(curl -sT $1 chunk.io)
if [ -n "$DISPLAY" ]; then
echo -n $URL | xclip
echo $URL "copied to the clipboard"
else
echo $URL
fi
@apg
apg / bcrypt.go
Last active August 5, 2016 20:36
Simple tool to get a bcrypt hash with a given cost. `go run bcrypt.go -password foobar -cost 20`
package main
import (
"flag"
"fmt"
"os"
"golang.org/x/crypto/bcrypt"
)

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style