| gitflow | git |
|---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
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
| module PayPal::SDK | |
| module REST | |
| module DataTypes | |
| Payer.class_eval do | |
| object_of :merchant_id, String | |
| end | |
| class ChargeModel < Base | |
| object_of :id, String | |
| object_of :type, String |
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
| ruby '2.2.0' | |
| source 'https://rubygems.org' | |
| ... | |
| gem 'font-awesome-rails' |
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
| #!/usr/bin/env ruby --disable-gems | |
| # Tab completion for minitest tests. | |
| # | |
| # INSTALLATION: | |
| # | |
| # 1. Put this file in a directory in your $PATH. Make sure it's executable | |
| # 2. Run this: | |
| # | |
| # $ complete -o bashdefault -f -C /path/to/this/file.rb ruby |
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
| # RSpec matcher for validates_with. | |
| # https://gist.github.com/2032846 | |
| # Usage: | |
| # | |
| # describe User do | |
| # it { should validate_with CustomValidator } | |
| # end | |
| RSpec::Matchers.define :validate_with do |expected_validator, options| | |
| match do |subject| | |
| @validator = subject.class.validators.find do |validator| |
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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| # Activate the gem you are reporting the issue against. |
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
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name mydomian.com *.mydomian.com; | |
| root /var/www/default/apps/myproject/current/public; | |
| passenger_enabled on; | |
| passenger_set_header X-Sendfile-Type "X-Accel-Redirect"; | |
| passenger_env_var HTTP_X_ACCEL_MAPPING /var/www/default/apps/myproject/shared/public/protects/=/protects/; |