- Name: vagrant-centos
- Operating System: Linux
- Version: Red Hat
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
# 4 workers is enough for our app | |
worker_processes 4 | |
# App location | |
@app = "/var/rails/myapp/current" | |
# Listen on fs socket for better performance | |
listen "#{@app}/tmp/sockets/unicorn.sock", :backlog => 64 | |
# Nuke workers after 30 seconds instead of 60 seconds (the default) |
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
# BEGIN Custom | |
Options -Indexes | |
RewriteEngine On | |
RewriteCond $1 !^wordpress/ | |
RewriteRule ^(.*)$ wordpress/$1 [L] | |
# END Custom |
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
#import "UIViewController+AppCategories.h" | |
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | |
{ | |
nibNameOrNil = [UIViewController nibNamedForDevice:@"ExampleViewController"]; | |
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | |
if (self) { | |
// Do any additional customization |
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
# important update xcode to 4.6 and make sure command line tools are installed under preferences | |
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
# if brew is already installed update existing | |
brew update | |
brew tap homebrew/dupes | |
# For rvm: | |
brew install bash curl 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
module SubmissionFormHelper | |
# Override the default ActiveRecordHelper behaviour of wrapping the input. | |
# This gets taken care of semantically by adding an error class to the wrapper tag | |
# containing the input. | |
# | |
FIELD_ERROR_PROC = proc do |html_tag, instance_tag| | |
html_tag | |
end |
Say you ssh into a server as the user deployer
and have a folder on the server ~/dump
:
# on the server you are logged into
# backup the database
mysqldump -uroot -pstrongPassword railsapp_staging > ~/dump/YYYYMMDD_railsapp_staging.sql
# next logout/exit your ssh session to the server above
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
# https://github.com/octokit/octokit.rb | |
require 'octokit' | |
Octokit.configure do |c| | |
c.login = ENV['GH_UID'] | |
c.password = ENV['GH_PWD'] | |
end | |
begin; Octokit.starred.each {|r| puts Octokit.client.unstar r.full_name}; end while Octokit.starred.size > 0; |
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
param ( | |
[string]$Deploy, | |
[switch]$SkipBackup, | |
[string]$Settings = "settings.xml" | |
) | |
$success = $false | |
function writeError($message) { | |
Write-Host $message -Foreground Red | |
break; |