Skip to content

Instantly share code, notes, and snippets.

@goofrider
goofrider / gist:4228811
Last active October 13, 2015 17:08
Useful RubyGems (and bad RubyGems)
gem 'compass-rails'
gem 'zurb-foundation'
# activeadmin is awesome
gem 'activeadmin'
gem "meta_search", '>= 1.1.0.pre'
gem 'yajl-ruby' # for json parsing
@goofrider
goofrider / hack.sh
Created February 17, 2013 16:15 — forked from erikh/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@goofrider
goofrider / php5-fcgid.conf
Created June 5, 2013 16:09
Use fcgid to run PHP scripts on Apache
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi .php
# Where to look for the php.ini file?
DefaultInitEnv PHPRC "/etc/php5/cgi"
# Maximum requests a process handles before it is terminated
MaxRequestsPerProcess 3000
# Maximum number of PHP processes
MaxProcessCount 100
# Number of seconds of idle time before a process is terminated
@goofrider
goofrider / config.ru
Created June 23, 2013 22:24
Serving PHP apps locally with with pow and rack-legacy http://stuff-things.net/2011/05/16/legacy-development-with-pow/
require 'rack'
require 'rack-legacy'
require 'rack-rewrite'
INDEXES = ['index.html','index.php', 'index.cgi']
use Rack::Rewrite do
rewrite %r{(.*/$)}, lambda {|match, rack_env|
INDEXES.each do |index|
if File.exists?(File.join(Dir.getwd, rack_env['PATH_INFO'], index))
@goofrider
goofrider / self-signed-sslcert
Created July 16, 2013 16:21
Generate private key and certificate signing request
# Generate private key and certificate signing request
# see https://devcenter.heroku.com/articles/ssl-certificate-self
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
openssl rsa -passin pass:x -in server.pass.key -out server.key
rm server.pass.key
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
@goofrider
goofrider / fresh-shell-basics.md
Last active December 19, 2015 21:58
Fresh shell basics

Installation

Install fresh with the following:

bash -c "`curl -sL get.freshshell.com`"

Manual steps

Don't want to run our shell script? The installation is simple:

@goofrider
goofrider / middleman-tpl-install.sh
Created July 17, 2013 19:39
middleman templates install
git clone git://github.com/mattolson/middleman-zurb-template.git ~/.middleman/zurb-foundation
git clone git://github.com/skatkov/middleman-prototype.git ~/.middleman/prototype
git clone git://github.com/pixelsonly/middleman-phonegap.git ~/.middleman/middleman-phonegap
git clone git://github.com/pixelsonly/middleman-hamlsasscoffee.git ~/.middleman/middleman-hamlsasscoffee
git clone http://github.com/nathos/amicus.git ~/.middleman/amicus
git clone git://github.com/nathanlong/middleman-combined.git ~/.middleman/combined
gem install middleman
gem install middleman-ratchet