Skip to content

Instantly share code, notes, and snippets.

View bluestrike2's full-sized avatar

Tom Stoecklein bluestrike2

View GitHub Profile
@bluestrike2
bluestrike2 / Gemfile
Created July 25, 2012 09:23
Statamic via pow.cx & rack-legacy
gem 'rack-legacy'
gem 'rack-rewrite'
@bluestrike2
bluestrike2 / es.sh
Created July 17, 2012 00:07 — forked from aaronshaf/es.sh
Install ElasticSearch on Ubuntu 12.04
cd ~
sudo apt-get update
sudo apt-get install unzip curl python-software-properties openjdk-7-jre -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.2.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
@bluestrike2
bluestrike2 / _footer.jade
Created May 7, 2012 09:07
HTML5 Boilerplate meets Jade. It was love at first site, with some minor tweaks to give it some spice.
@bluestrike2
bluestrike2 / sass-media-mixins.sass
Created April 7, 2012 06:04
Example of @media bubbling in sass
// media query module
// use: responsive style blocks output to @content
=tablet-portrait
@media screen and (min-width: 30em)
@content
=retina
@media screen and (-webkit-min-device-pixel-ratio: 2)
@content
// selector
@bluestrike2
bluestrike2 / config.legacy.ru
Created April 3, 2012 05:41
Config.ru files with Pow! in mind
# config.ru for running legacy apps through pow!
# credit: http://stuff-things.net/2011/05/16/legacy-development-with-pow/ & .rvm mod @ https://github.com/DoppioJP/php-on-.pow/blob/master/config.ru
# notes: just saving as a gist because in all honestly i'd probably lose it otherwise
$:.push("/Users/#{`whoami`}/.rvm/gems/ruby-1.9.2-p290@3.1/gems/rack-1.3.0/lib/")
$:.push("/Users/#{`whoami`}/.rvm/gems/ruby-1.9.2-p290@3.1/gems/rack-legacy-0.2.0/lib/")
$:.push("/Users/#{`whoami`}/.rvm/gems/ruby-1.9.2-p290@3.1/gems/rack-rewrite-1.0.2/lib/")
require "rack"
require "rack-legacy"
@bluestrike2
bluestrike2 / php.rb
Created April 3, 2012 06:07
php homebrew formula for running php apps through RACK e.g. pow
require 'formula'
def mysql_installed?
`which mysql_config`.length > 0
end
class Php <Formula
url 'http://www.php.net/get/php-5.4.0.tar.gz/from/this/mirror'
homepage 'http://php.net/'
md5 'f4ce40d5d156ca66a996dbb8a0e7666a'
@bluestrike2
bluestrike2 / jquery.autogrow.js
Created April 2, 2012 11:19 — forked from jlong/jquery.autogrow.js
Autogrow Textareas in jQuery
/*
* jquery.autogrow.js
*
* A plugin written for UserVoice that makes it easy to create textareas
* that automatically resize to fit their contents.
*
* Based on Scott Moonen's original code for Prototype.js:
*
* <http://scottmoonen.com/2008/07/08/unobtrusive-javascript-expandable-textareas/>
*
@bluestrike2
bluestrike2 / slim-convert.rb
Created April 1, 2012 04:19
Maybe Dr. Jekyll wouldn't have turned into Mr. Hyde if he was a touch slimmer. Bringing Slim to Jekyll.
## jekyll plugin: slim converter
## _plugins/slim-convert.rb
module Jekyll
require 'slim'
class SlimConverter < Converter
safe true
priority :low
def matches(ext)
@bluestrike2
bluestrike2 / h5bp-normalize-stylus.styl
Created January 18, 2012 03:13
HTML5 Boilerplate Normalize (Stylus)
// * Normalize.styl
// * USE: After reset, attempts to normalize certain style elements
// ****************************************************************
// ****************************************************************
// * Consistency Fixes - Adapted from normalize.css
// ********************************
html
height 100%
@bluestrike2
bluestrike2 / gist:1623318
Created January 16, 2012 22:11 — forked from raws/gist:1233539
Authenticate against ExpressionEngine >= 2.2.2 member data in Ruby
#!/usr/bin/env RBENV_VERSION=1.9.3-preview1 ruby
require "digest"
require "sequel"
module ExpressionEngine
module Authentication
ALGORITHMS = {
32 => Digest::MD5,
40 => Digest::SHA1,