This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
| # unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D | |
| rails_env = ENV['RAILS_ENV'] || 'production' | |
| # 16 workers and 1 master | |
| worker_processes (rails_env == 'production' ? 16 : 4) | |
| # Load rails+github.git into the master before forking workers | |
| # for super-fast worker spawn times | |
| preload_app true |
| Deploying a Rails 3 App with EC2 + S3 + Ubuntu + Capistrano + Passenger | |
| ======================================================================= | |
| EC2 Setup | |
| --------- | |
| 1 Launch New ec2 instance - ami-1634de7f | |
| 2 Create elastic IP [ELASTIC_IP] and associate it with instance | |
| 3 go to domain registrar DNS settings, @ and www to ELASTIC_IP | |
| 4 set the `:host` in `config/deploy.rb` to ELASTIC_IP |
| # hack to auto compile sass when Jammit runs in Dev/Test mode | |
| require 'haml/util' | |
| require 'sass/engine' | |
| module Jammit | |
| module Helper | |
| SASS_TIMESTAMPS = {} | |
| def include_stylesheets_with_sass(*packages) |
| /**********************************************/ | |
| /* | |
| /* IR_Black Skin by Ben Truyman - 2011 | |
| /* | |
| /* Based on Todd Werth's IR_Black: | |
| /* http://blog.toddwerth.com/entries/2 | |
| /* | |
| /* Inspired by Darcy Clarke's blog post: | |
| /* http://darcyclarke.me/design/skin-your-chrome-inspector/ | |
| /* |
This is an environment file to source upon shell startup (via .bashrc/.bash_profile or your shell's corresponding file). If your shell isn't Bash you will likely need to port the functions to your shell's syntax.
When inside your local Git clone of a Github repo you need to do the following (only once per repo):
| #!/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 | |
| # |
| # Get Sublime to use your rvm ruby... Change your ~/Library/Application Support/Sublime Text 2/Packages/Ruby/Ruby.sublime-build | |
| # (for ST3: ~/Library/Application Support/Sublime Text 3/Packages/User/Ruby.sublime-build) to this, replacing YOURUSERNAME. | |
| # I am still looking to optimize this further... For example, avoiding hardcoding by using something like $HOME, although | |
| # I have yet to get any form of that to work. | |
| { | |
| "working_dir": "${project_path}", | |
| "cmd": [ | |
| "/Users/YOURUSERNAME/.rvm/bin/rvm-auto-ruby", "-Ilib:test", "$file" | |
| ], |
| curl `pbpaste` | grep 'id="show-original-link"' | sed 's/^.*<li><a href="//' | sed 's/".*$//' | pbcopy |
| /* | |
| Copyright (c) 2017 Chris Patuzzo | |
| https://twitter.com/chrispatuzzo | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |