Skip to content

Instantly share code, notes, and snippets.

export PATH
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
ORANGE="\[\033[33m\]"
NO_COLOR="\[\033[0m\]"
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]$ORANGE\$(parse_git_branch)$NO_COLOR\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
{
"Working Directory" : "\/Users\/morrolan",
"Prompt Before Closing 2" : 0,
"Selected Text Color" : {
"Red Component" : 0.93947285353535359,
"Color Space" : "Calibrated",
"Blue Component" : 0.28870143366090156,
"Alpha Component" : 1,
"Green Component" : 0.8770805595029495
},
var aws = require('aws-sdk');
var zlib = require('zlib');
var async = require('async');
var EVENT_SOURCE_TO_TRACK = /sns.amazonaws.com/;
var EVENT_NAME_TO_TRACK = /CreateTopic/;
var DEFAULT_SNS_REGION = 'us-east-2';
var SNS_TOPIC_ARN = 'arn:aws:sns:us-west-2:123456789012:my-topic';
var s3 = new aws.S3();
@Morrolan
Morrolan / zabbixdeploy.py
Created February 27, 2015 11:24
Zabbix Deployment Script
__author__ = 'ihavelock'
# system modules
import logging
import json
import argparse
import os
import shutil
import fileinput
#!/usr/bin/python
"""
Count the number of lines in files recursively in a given directory.
To run direct rather than from the command line, switch the last line around.
"""
import os
import sys
@Morrolan
Morrolan / check_ip_no_auth.py
Created July 29, 2012 20:43
Raspberry Pi IP Emailer - no auth
#!/usr/bin/python
# The idea behind this script is if plugging a RaspberryPi into a foreign network whilst running it headless
# (i.e. without a monitor/TV), you need to know what the IP address is to SSH into it.
#
# This script emails you the IP address if it detects an ethernet address other than it's usual address
# that it normally has, i.e. on your home network.
import smtp, string
################################################
@Morrolan
Morrolan / check_ip.py
Created June 25, 2012 08:45
RaspberryPi IP address emailer
#!/usr/bin/python
# The idea behind this script is if plugging a RaspberryPi into a foreign network whilst running it headless
# (i.e. without a monitor/TV), you need to know what the IP address is to SSH into it.
#
# This script emails you the IP address if it detects an ethernet address other than it's usual address
# that it normally has, i.e. on your home network.
import smtplib, string, subprocess, time
################################################