Skip to content

Instantly share code, notes, and snippets.

@fbriere
fbriere / crashplan_uname.c
Created Oct 31, 2014
Simple uname(2) wrapper to work around a CrashPlan bug and enable real-time watching
View crashplan_uname.c
/*
* Simple uname(2) wrapper library that appends ".0" to any release version
* of the form X.Y -- for example, "3.16-2-amd64" becomes "3.16.0-2-amd64".
*
* This crude hack is meant to work around a CrashPlan bug[*]: real-time
* watching is only enabled after checking the kernel version for inotify
* support (which was added in 2.6.13), but the version is expected to be of
* the form X.Y.Z. If this is not the case, CrashPlan assumes that inotify
* is not supported, and real-time watching is disabled.
*
@fbriere
fbriere / envcan.css
Last active Nov 23, 2017
Stylish style for Environment Canada weather page
View envcan.css
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document
url-prefix("https://weather.gc.ca/city/pages/"),
url-prefix("https://meteo.gc.ca/city/pages/")
{
/* Hide everything except the main contents */
header, /* Header */
header + div, header + div + div, /* Various links */
/* Within main.container: */
@fbriere
fbriere / init.shell
Created Sep 23, 2014
Simple init process to start basic services and get a root shell with job control
View init.shell
#!/bin/sh
#
# Simple /sbin/init replacement that runs all runlevel S scripts, then drops
# into a root shell, in an infinite loop.
#
# Using this script as "init=" is similar to using the "single" boot parameter,
# but doesn't require a password, and logging out won't resume booting. And
# unlike "init=/bin/sh", this provides job control and runs the basic scripts.
/etc/init.d/rc S
@fbriere
fbriere / gitweb-config
Last active Aug 29, 2015
gitweb configuration for git.fbriere.net
View gitweb-config
(This is a dummy file to force a title for this Gist.)
@fbriere
fbriere / mailbinpurge.py
Last active Jan 22, 2018
Remove all binary attachments from email messages
View mailbinpurge.py
#!/usr/bin/python
# vim: set fileencoding=utf-8:
# Remove all binary attachments from email messages
#
# This is a standard UNIX filter; it reads a message or mailbox from standard
# input, and outputs it again on standard output, with all binary attachments
# removed (with message/external-body).
#
# Written by Frédéric Brière <fbriere@fbriere.net>. Copy at will.
You can’t perform that action at this time.