This file contains hidden or 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
<snippet> | |
<content><![CDATA[ | |
development: | |
adapter: postgresql | |
encoding: unicode | |
database: ${2:db}_development | |
host: localhost | |
pool: 5 | |
username: ${1:username} | |
password: |
This file contains hidden or 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
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-file-access-from-files |
This file contains hidden or 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 validateEmail(){ | |
//testing regular expression | |
var a = $("#email").val(); | |
// explination of symbols at: http://www.zparacha.com/validate-email-address-using-javascript-regular-expression/ | |
var filter = /^[a-zA-Z0-9]+[a-zA-Z0-9_.-]+[a-zA-Z0-9_-]+@[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{2,4}$/; | |
//if it's valid email | |
if(filter.test(a)){ //The test() method tests for a match in a string. | |
return true; | |
} |
This file contains hidden or 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://wiki.archlinux.org/index.php/Color_Bash_Prompt | |
# https://github.com/altercation/solarized/tree/master/iterm2-colors-solarized | |
# http://geoff.greer.fm/lscolors/ | |
# Colors | |
# ------------- | |
txtblk='\[\e[0;30m\]' # Black | |
txtred='\[\e[0;31m\]' # Red | |
txtgrn='\[\e[0;32m\]' # Green | |
txtylw='\[\e[0;33m\]' # Yellow |
This file contains hidden or 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
Show hidden characters
{ | |
"auto_complete": true, | |
"auto_complete_commit_on_tab": true, | |
"auto_match_enabled": true, | |
"close_windows_when_empty": true, | |
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme", | |
"default_line_ending": "LF", | |
"detect_indentation": true, | |
"dictionary": "Packages/Language - English/en_US.dic", | |
"draw_minimap_border": true, |
This file contains hidden or 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
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'rspec/autorun' | |
require 'capybara/rspec' | |
require 'database_cleaner' | |
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} | |
RSpec.configure do |config| | |
config.before(:suite) do |
This file contains hidden or 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
sudo sysctl -w kern.sysv.shmmax=1073741824 | |
sudo sysctl -w kern.sysv.shmall=1073741824 |
This file contains hidden or 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
CarrierWave.configure do |config| | |
config.fog_credentials = { | |
:provider => 'AWS', # required | |
:aws_access_key_id => ENV['AWSKEY'], # required | |
:aws_secret_access_key => ENV['AWSSEC'], # required | |
:region => 'us-east-1' # optional, defaults to 'us-east-1' | |
} | |
# config.fog_directory = 'temp-cm' # required | |
config.fog_public = false # optional, defaults to true | |
# config.fog_attributes = {'Cache-Control'=>'max-age=315576000'} # optional, defaults to {} |
This file contains hidden or 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
ActionMailer::Base.add_delivery_method :ses, AWS::SES::Base, :access_key_id => ENV['AWSKEY'], :secret_access_key => ENV['AWSSEC'] |
This file contains hidden or 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
group :development, :test do | |
gem 'pry-rails' | |
gem 'pry-debugger' | |
gem 'pry-stack_explorer' | |
gem 'annotate' | |
gem 'quiet_assets' | |
gem 'better_errors' | |
# BetterErrors.editor = :sublime if defined? BetterErrors (initializer) | |
# http://localhost:3000/__better_errors (reports last exception for debugging) | |
gem 'binding_of_caller' |
OlderNewer