This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rbenv install | |
## Assumptions | |
You are using homebrew. | |
## What to install? | |
* https://github.com/sstephenson/rbenv.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function powlink() { | |
pwd="$(pwd)" | |
echo -e "Adding $pwd to ~/.pow" | |
cd ~/.pow && ln -s "$pwd" && cd - | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'colored' | |
module App | |
class Project | |
class << self | |
def name | |
'Project Name' | |
end | |
def domain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function get_javascript_files { | |
underscore_js | |
backbone_js | |
zepto_js | |
require_js | |
} | |
function underscore_js { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.middleware.use RoutesReloader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |