Skip to content

Instantly share code, notes, and snippets.

Your sin smells to high heaven.
Your words are so foolishly and ignorantly composed that I cannot believe you understand them.
You are the most insane heretics and ingrafters of heretical perversity.
What you say is a blasphemy that has made you worthy of a thousand deaths.
Behold, indeed, this little golden work of a golden teacher! It is a work most worthy of golden letters, and lest there be something about it which is not golden, it must be handed down by golden disciples, namely, by those about whom it is said, "The idols of the nations are silver and gold. They have eyes, but they see not."
You are worthy only to be mocked by the words of error.
It is presumptuous for people who are as ignorant as you are not to take up the work of a herdsman.
What bilgewater of heresies has ever been spoken so heretically as what you have said?
What do you mean when you say this? Are you dreaming in the throes of a fever or are you laboring under a madness?
Your astute minds have been completely turned into stinking mu
@colby
colby / openssl.sh
Last active August 29, 2015 14:17
A simple script to upgrade OpenSSL related packages and restart services on Ubuntu/Debian
#!/bin/bash
awk=$(which awk || echo 'missing: install awk' && exit 1)
# update apt
sudo apt-get update
# get ssl related packages from simulated upgrade
sudo apt-get upgrade -s | grep ssl | grep Inst | $awk '{print $2}' | xargs -t sudo apt-get install -y
@colby
colby / rdio-search.sh
Created February 17, 2015 22:16
A bash script to find an HD YouTube video of the current Rdio song in Chrome.
#!/usr/bin/env bash
if ! pgrep -q Rdio
then
echo "Error: Rdio is not running"
exit 1
fi
function check {
which "$1" || echo "Missing dep: $1"; exit 1
@colby
colby / imgur.sh
Last active August 29, 2015 14:14
Imgur bash function to upload images
# Note: uses some random ClientID for authentication, does not handle errors
# Usage: $ imgur ~/Desktop/oleg.png
function imgur {
[ $# -lt 1 ] && echo "imgur: requires an image file path" && exit 1
curl -sH "Authorization: Client-ID 3e7a4deb7ac67da" -F "image=@$1" "https://api.imgur.com/3/upload" | grep -oE "http:.*\.[a-z]{3,4}" | tr -d '\'
}
@colby
colby / rdio.sh
Last active August 29, 2015 14:13
A bash script to find the first HD video that matches the current Rdio song playing.
#!/usr/bin/env bash
if ! pgrep -q Rdio
then
echo "Error: Rdio is not running"; exit 1
fi
function check {
which "$1" || echo "Missing dep: $1"; exit 1
}
# save last status
PROMPT_COMMAND='export last_status=$?'
PS1="\n\u@\H:\w\$(git_prompt)\n\$(last_status)\$ "
# only show status when non zero
function last_status {
if [ $last_status -gt 0 ]; then
echo $last_status
fi
@colby
colby / .git_bashrc.sh
Created January 9, 2015 00:45
Big dumb prompt for .bashrc
RESTORE='\[\033[0m\]'
RED='\[\033[00;31m\]'
GREEN='\[\033[00;32m\]'
YELLOW='\[\033[00;33m\]'
PURPLE='\[\033[00;35m\]'
GRAY='\[\033[00;37m\]'
# Normal user is purple, root is red.
if [ "$(id -u)" == '0' ]; then
USER_COLOR=$RED
@colby
colby / 10-work_related.sh
Last active August 29, 2015 14:11
Lunch time script and time tracker function
@colby
colby / -
Created August 7, 2014 20:56
# Dynamically generated file dropped off by Chef!
fs.file-max=131072
kernel.shmall=32768
kernel.shmmax=536870912
net.core.netdev_max_backlog=4096
net.core.optmem_max=25165824
net.core.rmem_default=25165824
net.core.rmem_max=25165824
net.core.somaxconn=4096
@colby
colby / gist:b324ff13b96d03e37976
Created July 16, 2014 18:55
Simple deploy script
#!/bin/bash
usage()
{
cat << EOF
usage: $0 ENV OPTIONS
This script will deploy to the host host.
ENVIRONMENTS: