Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.
####1. anchor file
Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:
| #!/usr/bin/env ruby | |
| # coding: utf-8 | |
| abort "Usage: fuck you <name>" unless ARGV[0] == "you" && ARGV.size == 2 | |
| a = "abcdefghijklmnopqrstuvqxyz".each_char.to_a | |
| b = "ɐqɔpǝɟƃɥıɾʞʃɯuodbɹsʇnʌʍxʎz".each_char.to_a | |
| ws = Hash[a.zip(b)] | |
| ws.default = ->(f){f} |
| RSpec.configure do |config| | |
| config.before(:suite) do | |
| DatabaseCleaner.clean_with(:truncation) | |
| end | |
| config.before(:each) do | |
| DatabaseCleaner.strategy = :transaction | |
| end | |
| config.before(:each, js: true) do |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| #!/bin/bash | |
| # Removel all local branchs whitch there is no link with remote repository. | |
| # Take care! It can remove branchs you have created but yet haven't linked with a remote branch. | |
| function clear_untracked_branchs { | |
| if [ -d "$(pwd)/.git" ]; then | |
| git pull | |
| git remote update origin --prune | |
| git branch | grep -v 'master' | grep -v '*' | sort | while read -r branch ; do | |
| if [ !$(git branch -r --list *$branch) ] ; then |
| * Only the releases of the stable versions are enumerated in principle. The releases of the unstable versions especially considered to be important are indicated as "not stable." | |
| * The branches used as the source of each releases are specified, and the branching timing of them are also shown. BTW, before subversionizing of the repository, the term called "trunk" was not used, but this list uses it in order to avoid confusion. | |
| * In order to show a historical backdrop, big conferences (RubyKaigi, RubyConf and Euruko) are also emurated. About the venues of such conferences, general English notations are adopted, in my hope. | |
| * ruby_1_8_7 branch was recut from v1_8_7 tag after the 1.8.7 release becaouse of an accident. | |
| * 1.2.1 release was canceled once, and the 2nd repelase called "repack" was performed. Although there were other examples similar to this, since the re-releases were performed during the same day, it does not write clearly in particular. | |
| * Since 1.0 was released with the date in large quantities |
| #!/usr/bin/env ruby | |
| def rebuild_config_files | |
| root_repo_dir = `git rev-parse --show-toplevel`.chomp | |
| change_branch = '1' | |
| if ARGV[2] == change_branch | |
| puts 'Rebuilding config files...' | |
| `#{root_repo_dir}/scripts/bootstrap_configs` | |
| end | |
| end |
| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
| '001' => 'BANCO DO BRASIL S.A.', | |
| '003' => 'BANCO DA AMAZONIA S.A.', | |
| '004' => 'BANCO DO NORDESTE DO BRASIL S.A.', | |
| '012' => 'BANCO STANDARD DE INVESTIMENTOS S.A.', | |
| '014' => 'NATIXIS BRASIL S.A.', | |
| '019' => 'BANCO AZTECA DO BRASIL S.A.', | |
| '021' => 'BANESTES S.A. BANCO DO ESTADO DO ESPIRITO SANTO', | |
| '024' => 'BANCO DE PERNAMBUCO S.A. - BANDEPE', | |
| '025' => 'BANCO ALFA S.A.', | |
| '029' => 'BANCO BANERJ S.A.', |