Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / coffee.md
Created November 29, 2016 02:55
a fussy guide to non-terrible coffee via french press

An Achin's Guide to French Pressitude

  1. Boil some good water. Filtered, if you can.

  2. Put 2 heaping tablespoons per 6 oz water in the press. Do not add water yet!

    (Yes this is a lot. Go for it. Brewing more coffee for less time tastes better.)

  3. Add a tiny pinch of salt. Small!

@Fuuzetsu
Fuuzetsu / hackagedocs
Last active December 13, 2022 22:40
Script for generating and uploading missing documentation for your Hackage packages. Now with fixed package links and contents page.
#!/usr/bin/env bash
cabal configure && cabal build && cabal haddock --hyperlink-source \
--html-location='/package/$pkg-$version/docs' \
--contents-location='/package/$pkg'
S=$?
if [ "${S}" -eq "0" ]; then
cd "dist/doc/html"
DDIR="${1}-${2}-docs"
cp -r "${1}" "${DDIR}" && tar -c -v -z --format=ustar -f "${DDIR}.tar.gz" "${DDIR}"
CS=$?
@0xabad1dea
0xabad1dea / tricksy.c
Last active December 17, 2015 14:59
A deceitful C program
// hello clever programmers, would you like to play a game?
// where's the bug?
// by 0xabad1dea :)
#include <stdio.h>
#include <string.h>
int main() {
char input[16] = "stringstring!!!";
char output[8];
@sampsyo
sampsyo / mk2mpris.py
Created July 9, 2012 20:41
forward GNOME media key events to an MPRIS2 player
"""mk2mpris.py: forward GNOME media key events to an MPRIS2 player.
"""
import dbus
from dbus.mainloop.glib import DBusGMainLoop
import gobject
APP_NAME = 'mk2mpris'
DBUS_INTERFACE_MK = 'org.gnome.SettingsDaemon.MediaKeys'
OBJ_PATH_MK = '/org/gnome/SettingsDaemon/MediaKeys'
OBJ_NAME_GSETTINGS = 'org.gnome.SettingsDaemon'