Skip to content

Instantly share code, notes, and snippets.

View ezza's full-sized avatar

Erin Francis ezza

  • Chargefox
  • Melbourne AU
View GitHub Profile
@ezza
ezza / Kona one20
Created October 19, 2009 03:29 — forked from joho/Kona one20
Frame sizes 19"
Frame tubing Kona Race Light Scandium Butted, 5" Travel
Rear Shock Fox Float RP2
Fork RockShox Recon 335 120mm
Headset TH
Crankarms Shimano XT (3)
Chainrings 44/32/22
B/B Shimano
Pedals Shimano XTR
Chain Shimano XT (3)
@ezza
ezza / .bashrc
Created March 1, 2012 03:20
Add beetil# prefixes to the commit message if your branch looks like it matches a beetil
# Verbose commit all changes to tracked files
alias gcav='git commit -avem "$(beetil_commit_prefix)"'
# Verbose commit specified files
# eg gcv app/views app/models/user.rb
gcv() {
git commit -vem "$(beetil_commit_prefix)" "$@"
}
# Warning: If you close the edit message window unchanged,
@ezza
ezza / gist:2626598
Created May 7, 2012 08:08
manually kick off csd notifications in a dev db
CsdNotification.destroy_all
CsdTransaction.destroy_all
icp = Icp.held.last
CsdNotification.create_all_for_icp!(icp, {:change_datetime => Time.now})
CsdNotification.process!
CsdTransaction.all.each do |transaction|
puts "\n\n\n"
puts transaction.transaction_type
// ==UserScript==
// @name G+ Hangouts Autojoin
// @description Automatically click the join button when loading a hangout
// @include https://plus.google.com/hangouts/_/*
// @match https://plus.google.com/hangouts/_/*
// @version 0.1.0
// ==/UserScript==
(function(){
@ezza
ezza / git-stash-grep
Last active December 28, 2015 02:09 — forked from hartym/git-stash-grep
Add to bashrc so you can stashgrep term
# added to ~/.bashrc
stashgrep() {
for i in `git stash list --format="%gd"`; do
git stash show -p $i | grep -H --label="$i" "$1"
done
}
# usage:
# stashgrep zip
# returns
@ezza
ezza / mysql-grant
Last active January 3, 2016 09:59
Grant access to the flippa DBs if your VM init script fails.
mysql -u root -e "GRANT ALL ON flippa.* TO flippa@localhost IDENTIFIED BY 'flippa';"
mysql -u root -e "GRANT ALL ON commerce.* TO flippa@localhost IDENTIFIED BY 'flippa';"
mysql -u root -e "GRANT ALL ON commerce.* TO commerce@localhost IDENTIFIED BY 'commerce';"
mysql -u root -e "CREATE DATABASE flippatest;"
mysql -u root -e "GRANT ALL ON flippatest.* TO flippa@localhost IDENTIFIED BY 'flippa';"
@ezza
ezza / word-loop.md
Last active August 29, 2015 14:05
Codeday Friday: Wordloop

Given a single word as input try to find a repeated letter inside of it such that you can loop the text around and reuse that letter. For example:

$ ruby word_loop.rb Mississippi
 i

 p
 p

Mis

 ss

 si
@ezza
ezza / gist:9590fc468dd3ecac5141
Last active August 29, 2015 14:19
AWS IO benchmarks
EBS optimized r3.xlarge instance with 3.3TB EBS volume attached.
###### Write benchmarks #########
sudo dd bs=1M count=2048 if=/dev/zero of=foo oflag=dsync
## 16GB EBS System Partition
2147483648 bytes (2.1 GB) copied, 51.1244 s, 42.0 MB/s
## 75GB Instance Store
2147483648 bytes (2.1 GB) copied, 24.5199 s, 87.6 MB/s
@ezza
ezza / .profile
Last active January 18, 2016 03:44
Colourify SSH terminal sessions
# Add this to ~/.profile
function tabc() {
NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi # if you have trouble with this, change
# "Default" to the name of your default theme
echo -e "\033]50;SetProfile=$NAME\a"
}
function colorssh() {
@ezza
ezza / gist:bedaae613be47fe4a6835a08a647668c
Created December 22, 2016 01:31 — forked from jacobh/gist:9884192
LIFX build status light
require 'LIFX'
require 'net/http'
require 'json'
# LIFX setup
green = LIFX::Color.green saturation: 1
red = LIFX::Color.red saturation: 1
white = LIFX::Color.white
off_color = LIFX::Color.white brightness: 0