Skip to content

Instantly share code, notes, and snippets.

View revans's full-sized avatar
🤠
Building Businesses

Robert Evans revans

🤠
Building Businesses
View GitHub Profile
@revans
revans / gist:1348811
Created November 8, 2011 19:19
rbenv install
# rbenv install
## Assumptions
You are using homebrew.
## What to install?
* https://github.com/sstephenson/rbenv.git
@revans
revans / osx_installer.sh
Last active October 4, 2016 05:31
OSX Installer of Homebrew, Rbenv, various homebrew libraries, rbenv plugins, gems, and ruby 1.9.3
#!/usr/bin/env bash
#
# Homebrew & Ruby setup for OSX
#
set -e
# Setup some array's
declare -a brew_libs=(apple-gcc42 openssl readline zlib libxml2 libyaml librsvg libiconv git curl solr wget redis sqlite memcached ack phantomjs mysql node)
declare -a rbenv_plugins=(ruby-build rbenv-vars rbenv-default-gems rbenv-gem-rehash)
<form accept-charset="UTF-8" action="https://moonshine-app.herokuapp.com/f/abc" method="POST" id="contact-form">
<input type="hidden" name="utf-8" value="✓">
<input type="text" class="col-md-6 col-xs-12 name" name="name" placeholder="Name *" required="">
<input type="text" class="col-md-6 col-xs-12 Email" name="email" placeholder="Email *" required="">
<input type="text" class="col-md-12 col-xs-12 Subject" name="subject" placeholder="Subject">
<textarea type="text" class="col-md-12 col-xs-12 Message" name="body" placeholder="Message *" required=""></textarea>
<div class="cBtn col-xs-12">
<ul>
<!-- <li class="clear"><a href="#"><i class="fa fa-times"></i>clear form</a></li> -->
<li class="send"><a href="#" onclick="document.getElementById('contact-form').submit();"><i class="fa fa-share"></i>Send Message</a></li>
@revans
revans / app.rb
Created May 25, 2011 02:31
Application File located in the lib directory of a Rails project.
require 'colored'
module App
class Project
class << self
def name
'Project Name'
end
def domain
@revans
revans / bonein
Created May 4, 2012 18:29
Backbone.js Template
#!/bin/sh
function get_javascript_files {
underscore_js
backbone_js
zepto_js
require_js
}
function underscore_js {
@revans
revans / 0. nginx_setup.sh
Created November 21, 2012 00:32 — forked from mikhailov/0. nginx_setup.sh
Nginx+Unicorn
# Nginx+Unicorn best-practices congifuration guide. Now with SPDY!
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies.
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module
#
# Deployment structure
#
# SERVER:
# /etc/init.d/nginx (1. nginx)
# /home/app/public_html/app_production/current (Capistrano directory)
#
config.middleware.use RoutesReloader
root(appname) do
mkdir "config"
mkdir "log"
mkdir "test"
touch "Readme.mkd"
template "config.ru", file_or_string
template "config/application.rb", file_or_string
cp "test/test_helper.rb", file_or_string
template "bin/script", file_or_string
module ObjectDiagnostics
extend self
#This is handy when you want to determine what types of objects are contributing to memory bloat
#returns the change in object counts since the last time this method was called
def change_in_object_counts
#this will start all counts at 0 for the initial run
@previous_counts ||= Hash.new(0)