Skip to content

Instantly share code, notes, and snippets.

View peteroome's full-sized avatar

Peter Roome peteroome

View GitHub Profile
@peteroome
peteroome / hyperlink_with_anchor.html
Created October 23, 2012 13:37
Hyperlink example with anchor
@peteroome
peteroome / sha2_for_jon.php
Created October 14, 2012 17:03
Sha2 Example Test
case 'sha2':
if (hmac_hash("sha512", $pass, $saltFromDatabase) === $hashFromDatabase))
{
$retval = 1;
}
break;
@peteroome
peteroome / front_end_developer_job_description_pandr.mdown
Created September 13, 2012 11:16
Freelance/Contract Front End Developer at PANDR

Freelance/Contract Front End Developer

PANDR are a small web design and development agency in Norwich, UK. We pride ourselves on the design and execution of beautiful and useable websites and applications. Our goal is always to exceed our clients expectations.

We're looking to enlist the services of really really (really!) talented front end developer for a 2 month period. You'll be working in partnership with a Ruby engineer, on a large code base (version controlled with Git), to deliver a beautiful interface for a client application. You'll also have the ability to work internally on PANDR projects too.

The ideal candidate profile combines a passion for UI/UX, great HTML/CSS/Javascript skills, a significant amount of perfectionism and the ability to finish projects and ship.

You must be able to demonstrate prior experience with examples of polished websites and applications that you're proud to show off. An ability to explain your use of Jav

@peteroome
peteroome / slownet.rb
Created July 24, 2012 09:04
Creates a slow network connection
#!/usr/bin/env ruby
print "Enter desired network speed (Kbit/s, e.g. 2000): "
speed = gets.strip.to_i
print "Enter desired latency (ms, e.g. 10): "
latency = gets.strip.to_i
print "Enter desired duration (how long do you want me to screw with your internet in seconds, e.g. 60): "
seconds = gets.strip.to_i
`sudo ipfw pipe 1 config bw #{speed}Kbits/s delay #{latency}ms`
`sudo ipfw add 1 pipe 1 src-port 80`
<ul class="articleTabber">
<li><a href="#" data-tab="1" class="current">1</a></li>
<li><a href="#" data-tab="2">2</a></li>
<li><a href="#" data-tab="3">3</a></li>
<li><a href="#" data-tab="4">4</a></li>
<li><a href="#" data-tab="5">5</a></li>
</ul>
<div class='article-tab current' data-tab="1">
<h1>Page 1: Put anything you like in here.</h1>
@peteroome
peteroome / application.css
Created February 6, 2012 16:47
Example manifest file
/*
*= require bootstrap
*/
/* rest of file omitted */
@peteroome
peteroome / Gemfile
Created December 3, 2011 11:57
Gemfile Sqlite Problem
source :rubygems
gem 'rails', '3.1.0'
gem 'rake', '0.8.7'
gem 'pg'
gem 'authlogic'
gem "grackle", '~> 0.1.10'
gem "will_paginate", "~> 3.0"
gem 'delayed_job'
gem 'hpricot'
@peteroome
peteroome / bash_completion
Created September 19, 2011 09:33
Git Bash Autocompletion OS X Terminal Prompt
# Set git autocompletion and PS1 integration
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
GIT_PS1_SHOWDIRTYSTATE=true
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
@peteroome
peteroome / pias_support_large
Created August 9, 2011 13:22
Support PIAS & Independent Music
<p><a href="http://goo.gl/gkRvx"><img src="http://thefourohfive.com/images/pias/pias_support_large.jpg" target="_blank" alt="Support PIAS and independent Music" width="466" height="96" /></a></p>
sudo env ARCHFLAGS="-arch x86_64" gem install mysql -v 2.7 -- --with-mysql-config=/usr/local/mysql/bin/mysql_configh-mysql-config=/usr/local/mysql/bin/mysql_co