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 / enables.scrbl
Last active November 16, 2017 09:14
Using the functions in graphviz.rkt, we now can do the things in enables.scrbl
@(require "graphviz.rkt")
@(require scriblib/figure)
@graphviz-figure["foo-bar" "Overview of Foo Bar"]{
digraph G {
foo -> bar
bar -> baz
baz -> quux
quux -> foo
}
#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 <[email protected]>
*
* 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"
)