Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
(defun shift-left (n) | |
;; shift a block of text by n space | |
(interactive "nHow many spaces? :") | |
(save-excursion | |
(save-restriction | |
(narrow-to-region (region-beginning) | |
(region-end)) | |
(beginning-of-buffer) | |
(while (< (point) (point-max)) | |
(beginning-of-line) |
# Include this module | |
# to add :before and :after hooks for instance method | |
# | |
# Example | |
# | |
# class User | |
# include Hookable | |
# | |
# def initialize | |
# @name = "wenjun.yan" |
# Pseudo app | |
use M1 | |
use M2 | |
use M3 | |
run app | |
# middle ware are stored in order | |
[M1, M2, M3] | |
# Then Rack call #to_app method to make a rack app containing |
$VERBOSE = nil | |
require File.expand_path('../rooby', __FILE__) | |
Person = Rooby::Class.new 'Person' do | |
define :initialize do |name| | |
@name = name | |
end | |
define :name do |
css { | |
[nav, a, id(:user)].define { | |
} | |
group nav, a, id(:user) { | |
} |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Returns the result of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |