Skip to content

Instantly share code, notes, and snippets.

View tamouse's full-sized avatar
🏠
Working from home

Tamara Temple tamouse

🏠
Working from home
View GitHub Profile
@tamouse
tamouse / Benchmark IPS output
Created August 10, 2014 06:50
SIngle quote vs. Double quote with no interpolation
[1] pry(main)> Benchmark.ips do |x|
[1] pry(main)* x.config(:time => 5, :warmup => 2)
[1] pry(main)* x.report('single quote') { 'hi there' }
[1] pry(main)* x.report('doulbe quote') { "hi there" }
[1] pry(main)* x.compare!
[1] pry(main)* end
Calculating -------------------------------------
single quote 72754 i/100ms
doulbe quote 75296 i/100ms
-------------------------------------------------

Collection CSS3 buttons

A collection of fancy, simple and clean buttons with CSS3 hover effects. Only works with modern browsers.

A Pen by Andres on CodePen.

License.

@tamouse
tamouse / kestell_tables.js
Last active August 29, 2015 14:07 — forked from kkestell/gist:ade30f868bd122707628
a javascript table formatter on the cheap
/*
Basic Usage
===========
Assuming your markup looks like this:
<table id="table" class="table"></table>
<div id="pagination" class="text-center"></div>
@tamouse
tamouse / install_emacs24.sh
Last active August 29, 2015 14:08
For older ubuntu/debian, installing emacs24 from source is relatively easy. I use the following to install emacs24 on vagrant boxes without X windows support. Works a champ.
# Obtain latest emacs from Savannah: http://ftp.gnu.org/gnu/emacs/
wget http://ftp.gnu.org/gnu/emacs/emacs-24.3.tar.gz
# Install dependencies:
sudo apt-get install libjpeg-dev libpng-dev libgif-dev libtiff-dev libncurses-dev -y
# Untar the archive:
tar xvfz emacs-24.3.tar.gz
cd emacs-24.3
@tamouse
tamouse / install_ruby.sh
Created November 2, 2014 22:35
Install ruby from source on debian-based linux distros.
# as root:
apt-get update
apt-get install build-essential git-core curl bison openssl \
libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev \
libyaml-dev libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev \
libcurl4-openssl-dev libopenssl-ruby apache2-prefork-dev libapr1-dev \
libaprutil1-dev libx11-dev libffi-dev tcl-dev tk-dev
cd /usr/src
@tamouse
tamouse / MOVED.md
Last active August 29, 2015 14:08
My Rails Application Template

This has been moved to a regular Github repo:

# in spec_helper.rb
RSpec.configure do |config|
records = []
config.before :suite do
Cequel::Record.descendants.each do |klass|
klass.after_create {|r| records << r }
end
end
@tamouse
tamouse / application.rb
Created November 12, 2014 11:50
showing time in different time zones
module Blahapp
class Application < Rails::Application
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
config.time_zone = 'Central Time (US & Canada)'
end
end
@tamouse
tamouse / deploy.sh
Last active August 29, 2015 14:09
jekyll deploy script
#!/bin/sh
#
# Simple deploy script for this blog.
: ${DEPLOY:=_deploy}
: ${BRANCH:=HEAD}
jekyll build -d $DEPLOY
cd $DEPLOY
git add --all

Keybase proof

I hereby claim:

  • I am tamouse on github.
  • I am tamouse (https://keybase.io/tamouse) on keybase.
  • I have a public key whose fingerprint is D3C8 FC31 E395 FEB0 B827 FF3F 9578 4824 BC3D 4D6F

To claim this, I am signing this object: