Skip to content

Instantly share code, notes, and snippets.

View paulspringett's full-sized avatar

Paul Springett paulspringett

  • Leeds, United Kingdom
  • 02:02 (UTC +01:00)
View GitHub Profile
@paulspringett
paulspringett / pow.sh
Created July 6, 2011 16:00
Bash shortcut to create Pow! symlink for current directory
# add this to your .bash_profile
function pow() {
name=`basename $PWD`
if [[ $1 && $1 != "-ru" ]]; then
name=$1
fi
echo "Using name: $name"
@paulspringett
paulspringett / gist:1016532
Created June 9, 2011 11:05
Streamsend ActiveResource fix
class Streamsend::Blast < ActiveResource::Base
self.site = "https://app.streamsend.com/"
self.user = "{login_id}"
self.password = "{key}"
self.element_name = "blast"
private
# fix because streamsend rarely includes the type="array" attribute
gem install cucumber webrat
./script/generate cucumber --test-unit
@paulspringett
paulspringett / sha1_digest.rb
Created September 27, 2010 13:11
SHA1 HexDigest code
require 'digest/sha1'
sha1 = Digest::SHA1.hexdigest('something secret')
@paulspringett
paulspringett / jquery.dataset.js
Created July 21, 2010 13:57
Plugin to allow easy read/write access to HTML5 data- attributes
$.fn.dataset = function(key, value) {
if(value != null) {
if($(this).attr('data-' + key)) {
$(this).attr('data-' + key, value);
return true;
} else {
return false;
}
} else {
return $(this).attr('data-' + key);
### Keybase proof
I hereby claim:
* I am paulspringett on github.
* I am paulspringett (https://keybase.io/paulspringett) on keybase.
* I have a public key whose fingerprint is CA7D E438 060B 4BE7 E82D 044E D9EC 1739 EEEB 5895
To claim this, I am signing this object: