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
| require 'rubygems' | |
| require 'yaml' | |
| # A demonstration of YAML anchors, references and handling of nested values | |
| # For more info, see: | |
| # http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/ | |
| stooges = YAML::load( File.read('stooges.yml') ) | |
| # => { | |
| # "default" => { |
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
| -Go to the starting point of the project | |
| >> git checkout origin master | |
| -fetch all objects | |
| >> git fetch origin | |
| -Make the branch from the tag | |
| >> git branch new_branch tag_name | |
| -Checkout the branch | |
| >> git checkout new_branch | |
| -Push the branch up | |
| >> git push origin new_branch |
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
| > date -d-1day | |
| Mon Sep 6 09:08:43 CEST 2010 | |
| > date -d-1day +%Y%m | |
| 201009 |
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
| #recursively require all files in directory (and subdirectories) | |
| Dir["#{File.dirname(__FILE__)}/squat/**/*.rb"].each {|file| require file } | |
| #recursively require all files in directory but skip paths that match a pattern | |
| Dir["#{File.dirname(__FILE__)}/squat/**/*.rb"].each do |file| | |
| require file unless file =~ /\/model\// | |
| end |
NewerOlder