GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
#!/usr/bin/env python | |
# | |
# Very basic example of using Python and IMAP to iterate over emails in a | |
# gmail folder/label. This code is released into the public domain. | |
# | |
# RKI July 2013 | |
# http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/ | |
# | |
import sys | |
import imaplib |
# $OpenBSD: pf.conf,v 1.52 2013/02/13 23:11:14 halex Exp $ | |
# | |
# See pf.conf(5) for syntax and examples. | |
# | |
# Remember to set net.inet.ip.forwarding=1 and/or net.inet6.ip6.forwarding=1 | |
# in /etc/sysctl.conf if packets are to be forwarded between interfaces. | |
### Macros | |
# system |
import hexchat | |
__module_name__ = "novoice" | |
__module_version__ = "2.0" | |
__module_description__ = "Ignores voice messages from ChanServ" | |
def voice_event(word, word_eol, userdata): | |
return hexchat.EAT_HEXCHAT | |
hexchat.hook_print("Channel Voice", voice_event) |
// ==UserScript== | |
// @name unfix-all-the-toolbars | |
// @description Removes "position: fixed" style from elements, unfixing "toolbars" and the such. | |
// @namespace http://inf.ufrgs.br/~vbuaraujo/ | |
// @include * | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
} | |
NodeList.prototype.__proto__ = Array.prototype; |
// I2C to USB Adapter using Arduino | |
// by Bernhard Kraft <kraftb@think-open.at> | |
/** | |
* This sketch can get loaded onto an Arduino to use it as USB to I2C Adapter. | |
* It uses the Wire library. So take a look at the documentation of the Wire | |
* libarary about the pins being used as SDA/SCL. For most Arduino boards this | |
* will be analog input pin 4 for SDA and analog input pin 5 for SCL. | |
* | |
* On the USB side the default serial link of the Arduino is used. A protocol |
23.21.150.121:3478 | |
iphone-stun.strato-iphone.de:3478 | |
numb.viagenie.ca:3478 | |
s1.taraba.net:3478 | |
s2.taraba.net:3478 | |
stun.12connect.com:3478 | |
stun.12voip.com:3478 | |
stun.1und1.de:3478 | |
stun.2talk.co.nz:3478 | |
stun.2talk.com:3478 |
{# | |
Source: http://dev.dbl-a.com/symfony-2-0/symfony2-and-twig-pagination/ | |
Updated by: Simon Schick <simonsimcity@gmail.com> | |
Parameters: | |
* currentFilters (array) : associative array that contains the current route-arguments | |
* currentPage (int) : the current page you are in | |
* paginationPath (string) : the route name to use for links | |
* showAlwaysFirstAndLast (bool) : Always show first and last link (just disabled) | |
* lastPage (int) : represents the total number of existing pages |
On my RetroPie machine I wanted a hardware volume knob — the games I play use a handful of emulators, and there's no unified software interface for controlling the volume. The speakers I got for my cabinet are great, but don't have their own hardware volume knob. So with a bunch of googling and trial and error, I figured out what I need to pull this off: a rotary encoder and a daemon that listens for the signals it sends.
A rotary encoder is like the standard potentiometer (i.e., analog volume knob) we all know, except (a) you can keep turning it in either direction for as long as you want, and thus (b) it talks to the RPi differently than a potentiometer would.
I picked up this one from Adafruit, but there are plenty others available. This rotary encoder also lets you push the knob in and treats that like a button press, so I figured that would be useful for toggling mute on and off.