If you run into terminal error too many open files
Below are the steps to increase the limit environment setting for maxflies
Show current config:
launchctl limit
maxfiles 256 unlimited
# rbenv & brew git/bash completion terminal setup | |
# for dev desktop only on osx | |
# Run the following commands in order to use this script: | |
################################################################ | |
# !! => Update/Install xcode Command Line Tools <= !! | |
# In your shell/terminal: | |
# Homebrew perms needed: | |
# sudo chown -R root:admin /usr/local | |
# sudo chown -R root:admin /Library/Caches/Homebrew | |
# ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
If you run into terminal error too many open files
Below are the steps to increase the limit environment setting for maxflies
Show current config:
launchctl limit
maxfiles 256 unlimited
Express guide to a rails 3.2+ testing custom app subdomains using cucumber capybara with a pow setup... along with devise mailer config helper example (useful if you need to test various auth situations for custom subdomains in a rails app).
If you haven't used pow, I wouldn't recommend it for local web dev... there's much better gems for local web dev like unicorn-rails or passenger nginx standalone are far better choices IMHO. I use pow for all the local name redirects to a port like explained below, with a rails dev server listening on that port running unicorn-rails.
So we're going to use it for the awesome subdomain redirect to a local customapp.dev on a specific port magic mojo.
param ( | |
[string]$Deploy, | |
[switch]$SkipBackup, | |
[string]$Settings = "settings.xml" | |
) | |
$success = $false | |
function writeError($message) { | |
Write-Host $message -Foreground Red | |
break; |
# 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; |
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
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 |
# 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 |
#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 |