Skip to content

Instantly share code, notes, and snippets.

sudo rm -rf /
@colby
colby / trial.md
Last active September 7, 2015 05:53
A time trial to be taken on bike.

#Bike Time Trial

Skip the weather, use a training device. Doesn't matter if it's old or new, roller or fluid, so long as it works. Any trainer will work.

You'll need a speed meter and a timer. Cadence meters are very useful and can also make this task more interesting.

If you don't have a cadence meter, or you don't want to buy one, use an online calculator tuned with your bike measurements against the speed graph. This will give you a rough speed/cadence table to work with.

The trial is to match cadence with duration for repetitions. You will allow you to get some good milage in while keeping yourself preoccupied from thinking about distance.

1) Make everything in a bucket public (e.g. everyone has read access)
s3cmd setacl s3://myexamplebucket.calvium.com/ --acl-public --recursive
2) Make everything in a bucket private (e.g. accessible only to the creator)
s3cmd setacl s3://myexamplebucket.calvium.com/ --acl-private --recursive
@colby
colby / -
Created August 31, 2015 18:02
$ awk '{print $1}' ~/.bash_history | sort | uniq -c | sort -nr | head -n20
5676 git
2612 now
1937 vim
1630 ssh
1186 j
829 cd
617 curl
591 clear
370 grep
# Start of entries inserted by Spybot - Search & Destroy
127.0.0.1 www.007guard.com
127.0.0.1 007guard.com
127.0.0.1 008i.com
127.0.0.1 www.008k.com
127.0.0.1 008k.com
127.0.0.1 www.00hq.com
127.0.0.1 00hq.com
127.0.0.1 010402.com
127.0.0.1 www.032439.com
iptables -P FORWARD DROP # we aren't a router
iptables -A INPUT -m state --state INVALID -j DROP # drop bad packets
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT # allow current connections
iptables -A INPUT -i lo -j ACCEPT # allow lo interface
iptables -A INPUT -s 1.2.3.4 -j ACCEPT # allow whom-ever ya want
iptables -P INPUT DROP # drop the rest
# Vinnum Sabbathi - Last Trip From The Superclusters To Earth (Doom rock from Mexico, using real samples from NASA missions)
https://www.youtube.com/watch?v=4zq2lWK8WJk
# Gojira - Flying Whales (Metal from France)
https://www.youtube.com/watch?v=sDIkDOtAuoo
# True Widow - NUMB HAND (Doom rock from US)
https://www.youtube.com/watch?v=4YCE-_pKf1A
# Black Crown Initiate - Great Mistake (Metal from US)
@colby
colby / imgur
Created April 5, 2015 00:35
A simple shell script to upload images to Imgur.
#!/usr/bin/env bash
# variables
img="$1"
tmp=/tmp/imgur
id='3e7a4deb7ac67da'
link='https://api.imgur.com/3/upload'
# functions
errcho() {
@colby
colby / battery.sh
Last active December 17, 2017 10:05
A bash script for getting the laptop battery percentage for tmux.
#!/bin/bash
#
# To include the line below into your .tmux.conf to see battery % or charging icon.
# set -g status-right "#(/Users/colbyolson/src/scripts/battery.sh) #H %H:%M"
ok_color="colour236"
warn_percent="20"
warn_color="colour208"
status=$(pmset -g batt)
@colby
colby / sandman
Last active August 29, 2015 14:18
Sandman: A bash script to find all known Vagrant VMs and put them to sleeps. Zzz.
#!/usr/bin/env bash
# variables
vagrant=""
# functions
errcho() {
>&2 echo "$*"
exit 1
}