Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am ghedo on github.
  • I am ghedo (https://keybase.io/ghedo) on keybase.
  • I have a public key whose fingerprint is A4F4 55C3 414B 1056 3FCC 9244 AFA5 1BD6 CDE5 73CB

To claim this, I am signing this object:

View 60fps.py
# Usage: mpv --vf=vapoursynth=60fps.py --hwdec=no <file>
import vapoursynth as vs
core = vs.get_core()
src_fps = 24
dst_fps = 60
clip = core.std.AssumeFPS(video_in, fpsnum=src_fps)
super = core.mv.Super(clip, pel=2)
View systemd-start-and-wait.go
package main
import "log"
import "os"
import "github.com/docopt/docopt-go"
import "github.com/godbus/dbus"
const target string = "org.freedesktop.systemd1";
const object string = "/org/freedesktop/systemd1";
View ATSHA204.cpp
/*
* Arduino library for the ATSHA204 authentication chip.
*
* The ATSHA204 is a tiny and low-power authentication chip. This library
* implements a simple interface to access most of the chip functionality from
* an Arduino.
*
* Note that only the Single-Wire Interface (SWI) is currently supported.
*
* FEATURES:
View MMA8452Q.cpp
/*
* Arduino library for the MMA8452Q three-axis accelerometer.
*
* The MMA8452Q is a tiny and low-power three-axis accelerometer. This
* library implements a simple interface to access most of the chip
* functionality from an Arduino.
*
* FEATURES:
* + Normal and fast raw axes values reading
* + Scale configuration (allowed 2g, 4g and 8g scales)
View bipipe.c
/*
* Bidirectional pipe
*
* Compile:
* $ cc -o bipipe bipipe.c
*
* Examples:
*
* * Unix domain socket chat over SSH:
*
View sleepd.c
/*
* Execute a command after some time of inactivity
*
* Compile:
* $ cc -o sleepd sleepd.c
*
* Usage:
* $ ./sleepd -t 600 -c "slock"
*
* NOTE: to run this as a normal (non-root) user you may need to change
View mouse_wrap.c
/*
* Wrap mouse pointer at screen edges.
*
* Compile:
* $ cc -o mousewrap mouse_wrap.c -lX11 -lXi
*
* Usage:
* $ ./mwrap
*
* Copyright (C) 2012 Alessandro Ghedini <alessandro@ghedini.me>
View gist_backup.pl
#!/usr/bin/perl
# Usage: gist_backup.pl <user>
# Clone all the gists of a GitHub user
use strict;
use warnings;
use Git::Raw;
use Pithub::Gists;
View wr
#!/usr/bin/perl
# Usage: wr <term> [<dict>]
# Translate a word using wordreference.com
use strict;
use warnings;
use feature qw(say);