Skip to content

Instantly share code, notes, and snippets.

@saidie
saidie / .bashrc
Last active December 20, 2015 22:49
Show a git branch in bash prompt.
GIT_BRANCH='`git branch 2> /dev/null | sed -e "/^[^*]/d" -e "s/^* \(.*\)$/(\1)/"`'
PS1="[\u@\h \W$GIT_BRANCH]\$ "
@saidie
saidie / wpa2-peap-mschapv2
Last active December 18, 2015 13:59
wicd template for WPA2 PEAP (EAP-MSCHAPv2). Modified version of /etc/wicd/encryption/templates/wpa2-peap in an Arch package wicd 1.7.2.4-7.
name = WPA2-PEAP-MSCHARPv2
author = saidie
version = 1
require identity *Username password *Password
protected password *Password
-----
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="$_ESSID"
proto=RSN
@saidie
saidie / articlefilter.js
Created April 22, 2012 02:41
article filter
function nextArticle(articles){
if(articles.length == 0) return(null);
var date = new Date();
return(articles[date.getMinutes() % articles.length]);
}