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 | |
sudo /usr/local/sbin/nginx; | |
sudo apachectl start | |
mysql.server start; | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start | |
exit; |
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/bash | |
# This tool checks if there are any uncommitted changes in the current git branch. | |
# If it finds any uncommited changes it exits with an error. | |
# We use it to prevent pushing dirty changes to production. | |
clean=$(git status | grep "nothing to commit (working directory clean)") | |
if [ -z "$clean" ]; then | |
echo There are uncommitted changes. | |
exit 1 | |
else |
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
if @grouped | |
object @days | |
node do |date| | |
node(:changed) { date[:changed].format } | |
node(:balance) { date[:balance].format } | |
child date[:transactions] => :transactions do | |
extends 'transactions/show' | |
end | |
node(:date) { date[:date] } |
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
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics. |
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
def active_tab | |
link_to("Homepage", root_path, :class => ("active" if current_page? root_path)) | |
end |
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 'rspec' | |
class Risk | |
def code(user) | |
user_site = user.site[0..1] | |
if department | |
department_name = department.name[0..1] | |
end | |
[user_site,department_name,"001"].compact.join('-').upcase |
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 'capistrano/ext/multistage' | |
require "rvm/capistrano" | |
require "bundler/capistrano" | |
require "delayed/recipes" | |
require 'new_relic/recipes' | |
set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") # Read from local system | |
set :default_environment, { | |
'PATH' => "/home/rails/.rvm/gems/ruby-1.8.7-p370@appname/bin:/home/rails/.rvm/bin:/home/rails/.rvm/rubies/ruby-1.8.7-p370/bin:$PATH", |
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
class ClientController < ApplicationController | |
respont_to :html | |
def show | |
@client = Client.find(params[:id]) | |
respond_with @client | |
end | |
end |
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
app = angular.module('Simple') | |
@SimpleCtrl = ['$scope', ($scope) -> | |
$scope.data = {output: 'hello world'} | |
doSomething = () -> | |
$scope.data.output => "hello application." | |
] | |
### |
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
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<base href="http://localhost:3000/proxy/"> | |
</head> | |
<body> | |
<p>Open the console and notice the following error | |
<code> |