Skip to content

Instantly share code, notes, and snippets.

View bertrandom's full-sized avatar

Bertrand Fan bertrandom

View GitHub Profile
A 20
LEFT 64
UP 55
THROW
typedef enum {
UP,
DOWN,
LEFT,
RIGHT,
X,
Y,
A,
B,
L,
./gifenc.sh "babybump%02d.jpg" "babybump.gif"
convert babybump.gif \( +clone -set delay 300 \) +swap +delete -loop 0 babybump_with_pause.gif
#!/bin/sh
palette="/tmp/palette.png"
filters="fps=4,scale=320:-1:flags=lanczos"
ffmpeg -v warning -framerate 4 -f image2 -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -framerate 4 -f image2 -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
const async = require('async');
var gm = require('gm');
var sprintf = require("sprintf-js").sprintf;
var faces = require('./faces.json');
var bumps = [];
for (var i = 1; i <= 66; i++) {
bumps.push(i.toString());
}
{
"1": [
{
"faceId": "e2a4980d-6af1-4cad-b67d-9d72cb6b0c21",
"faceRectangle": {
"top": 563,
"left": 676,
"width": 113,
"height": 113
}
@bertrandom
bertrandom / private.xml
Created August 18, 2016 17:11
Karabiner config to set WASD keyboard F13 to display sleep
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>My_Keyboard_VendorID</vendorname>
<vendorid>0x04d9</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>My_Target_Keyboard_ProductID</productname>
#!/bin/bash
for i in `seq 1 7306`;
do
frame=$(printf '%06d' "$i")
echo $frame
curl "https://slack.com/api/chat.postMessage?token=SLACK_API_TOKEN&channel=CHANNEL_ID&username=Star%20Wars&text=http://starwars.toomanycooks.kitchen/out$frame.jpg&as_user=starwarsbot"
sleep 10
done