run_load_hooks(:action_mailer, self)
run_load_hooks(:action_controller, self)
run_load_hooks(:action_view, self)
run_load_hooks(:active_record, Base)
run_load_hooks(:i18n)
run_load_hooks(:active_record, ActiveRecord::Base)
run_load_hooks(:basic_hook)
run_load_hooks(:basic_hook_with_two, FakeContext.new(2))
run_load_hooks(:basic_hook_with_two, FakeContext.new(5))
This file contains 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 bash | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install caskroom/cask/brew-cask rbenv ruby-build | |
brew tap caskroom/versions | |
brew cask instal iterm2 sublime-text3 | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
source ~/.bash_profile | |
rbenv install 2.1.3 | |
rbenv global 2.1.3 | |
gem update --system |
This file contains 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
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.provision :shell, path: "bootstrap.sh" | |
config.vm.network :forwarded_port, guest: 3000, host: 3000 | |
end |
I hereby claim:
- I am tonytonyjan on github.
- I am tonytonyjan (https://keybase.io/tonytonyjan) on keybase.
- I have a public key whose fingerprint is F30B 53C9 A9CC B71C A034 4E2A 055A F90B C74E 4F4C
To claim this, I am signing this object:
This file contains 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
# ~/.config/fish/functions/fish_prompt.fish | |
set -g __fish_git_prompt_show_informative_status 1 | |
set -g __fish_git_prompt_hide_untrackedfiles 1 | |
set -g __fish_git_prompt_color_branch magenta bold | |
set -g __fish_git_prompt_showupstream "informative" | |
set -g __fish_git_prompt_char_upstream_ahead "↑" | |
set -g __fish_git_prompt_char_upstream_behind "↓" | |
set -g __fish_git_prompt_char_upstream_prefix "" |
This file contains 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 | |
## Description | |
A tool for Octopress to generate IDs in header tags and index list aside. It helps you easily build a tutorial page with many chapters. | |
## Features | |
* Support all languages. | |
## Syntax |
This file contains 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
# usage rake new_page[my-new-page] or rake new_page[my-new-page.html] or rake new_page (defaults to "new-page.markdown") | |
desc "List all posts with an asterisk if it's published. Advanced usage: 'rake list_posts[pub|unpub]'" | |
task :list_posts, :type do |t, args| | |
type = args.type | |
result = "" | |
Dir.glob("#{source_dir}/#{posts_dir}/*.markdown").sort.each do |post| | |
file = File.read(post) | |
file =~ /^(---\s*\n.*?\n?)^(---\s*$\n?)/m | |
data = YAML.load($1) |
This file contains 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
# Usage: | |
# > rails new myapp -m https://gist.github.com/raw/4010690/d9106a1c3af695d1ed4ef8d16e3c8a06b5e3c7f3/tj_rails_template.rb | |
config = {} | |
puts "Gems:" | |
config[:install_devise_cancan_rolify] = yes? "install devise, cancan, rolify?" | |
config[:install_form_helpers] = yes? "install simple_form, dynamic_form, nested_form?" | |
config[:install_bootstrap_tjstyle] = yes? "install bootstrap, tjstyle?" | |
config[:install_rspec_spork] = yes? "install rspec, spork?" |
This file contains 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
#include <stdio.h> | |
#define SWAP(a,b) do{ typeof(a) tmp = a; a = b; b = tmp; }while(0) | |
void permutate(int* v, int n, int i) { | |
int j; | |
if (i == n) { | |
for(j = 0; j < n; j++) printf("%d ", v[j]); | |
printf("\n"); | |
}else | |
for(int j = i; j < n; j++) { |
- 到 https://github.com/orgs/rubytaiwan/teams/rubyists 取得 GitHub 帳號。
- 使用 GitHub API 取得個別帳號下的所有 public repo,尋找
*.gemspec
,並取得 gem name。 - 透過 RubyGems API 用 gem name 尋找 gem owner。
- 有些 gem 有複數個 owner,可能會有老外混進去。
- 有的人會把知名專案用 fork 以外的方式 push 到自己的帳號,導致 repo 真正的作者與 repo 帳號擁有者不一致。
OlderNewer