This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import socket | |
from slacker import Slacker | |
from config import configuration | |
logger = logging.getLogger('slack') | |
class Slack(object): | |
def __init__(self, printer): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto lo | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
allow-hotplug wlan0 | |
iface wlan0 inet manual | |
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf | |
iface default inet dhcp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find branches already merged | |
git branch -a --merged | |
# Find a list of branches by date and author | |
git for-each-ref --sort=committerdate --format='%(committerdate:short) %(authorname) %(refname:short)' | grep "origin" | |
# Prune your locally cloned version | |
git fetch -p | |
git gc --prune=now | |
git remote prune origin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !^.*\.png | |
RewriteRule ^/(.+) /index.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import feedparser | |
import time | |
rss_feeds = { | |
"http://status.aws.amazon.com/rss/elb-us-east-1.rss", | |
"http://status.aws.amazon.com/rss/ec2-us-east-1.rss", | |
"http://status.aws.amazon.com/rss/elasticache-us-east-1.rss", | |
"http://status.aws.amazon.com/rss/rds-us-east-1.rss", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source /etc/default/backup | |
MONTH_TWO=$(date -d "- 2 month" '+%Y-%m') | |
MONTH_PREV=$(date -d "- 1 month" '+%Y-%m') | |
MONTH_NOW=$(date '+%Y-%m') | |
DATE=`date +%Y-%m-%d` | |
HOST=`hostname` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PROJECTS="Project_1 Project_2 Project_3" | |
BRANCH="$1" | |
if [[ -z "$BRANCH" ]]; then | |
echo "Usage $0 BRANCH_NAME" | |
exit -1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
karamba x=100 y=210 w=220 h=900 interval=1000 locked=true | |
defaultfont color=255,255,255 fontsize=9 font="DejaVu Sans" shadow=1 bgcolor=0,0,0 | |
# time | |
text x=55 y=0 sensor=time format="ddd, MMM d yyyy" fontsize=12 | |
text x=45 y=15 sensor=time format="hh:mm" font="DejaVu Sans Mono" fontsize=48 | |
text x=65 y=70 sensor=uptime format="Up %dd %Hh:%Mm" fontsize=12 | |
# proc | |
image x=95 y=80 path="/usr/share/icons/oxygen/48x48/devices/cpu.png" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# ------------------------------------------------------ | |
# Dropbox Startup Script for Unix | |
# ------------------------------------------------------ | |
# dropbox This shell script takes care of the Dropbox server instance | |
# | |
# chkconfig: 2345 80 30 | |
# description: dropbox is liquid awesome | |
# processname: java |