View keybase.md

Keybase proof

I hereby claim:

  • I am gogojimmy on github.
  • I am gogojimmy (https://keybase.io/gogojimmy) on keybase.
  • I have a public key whose fingerprint is C0D6 893D 457D 006D 8477 C54A CE06 8843 E498 948F

To claim this, I am signing this object:

View test.md
  1. 一般 Hash 情況是這樣:
hash = {}
hash[:foo][:bar] = :hello
=> NoMethodError: undefined method `[]=' for nil:NilClass

請建立一個 Hash 可以不管 key 值是否存在都可以自動設定 key 及 value

View keybase.md:
### Keybase proof
I hereby claim:
* I am gogojimmy on github.
* I am gogojimmy (https://keybase.io/gogojimmy) on keybase.
* I have a public key whose fingerprint is 1BD7 6CD9 DB41 5053 7E61 8BD5 7E69 2D01 B612 C9F8
To claim this, I am signing this object:
View 網站基本設計參數.md

顏色

各種所用顏色的色碼(主色、輔助色...)

字型

  • 字型名稱
  • 基礎大小
  • 基礎行高
  • h1~h6大小
View 網站分析高級應用.md

追蹤使用者行為

記錄頁面名稱

pageTracker._trackPageView('頁面名稱');

追蹤出站連結(廣告、友情連結)

View WordPress.md
View ApplicationController.rb
class ApplicationController < ActionController::Base
before_action :auth_via_sso_cookie
private
def auth_via_sso_cookie
if !current_user_id && cookies[:sso_from] && cookies[:sso_token] && cookies[:sso_env] == Rails.env
verifier = ActiveSupport::MessageVerifier.new( SSO_SECRET_TOKEN.fetch(cookies[:sso_from]) )
user_id = verifier.verify( cookies[:sso_token] )
View Guard.rb
interactor :simple
guard 'jruby-rspec', cli: ['--format', 'Fuubar', '--tty', '--colour', '--drb', '--ng'], all_on_start: false, all_after_pass: false do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
View Guard Show
+---------+------------+------------------+--------------------------------------------------------------+
| Group | Plugin | Option | Value |
+---------+------------+------------------+--------------------------------------------------------------+
| Default | Spork | aggressive_kill | true |
| | | cucumber_env | {"RAILS_ENV"=>"test"} |
| | | cucumber_port | 8990 |
| | | foreman | false |
| | | minitest | false |
| | | minitest_env | {} |
| | | minitest_port
View mac-bootstrap.sh
#!/bin/sh
USERNAME=gogojimmy
mkdir ~/tmp
cd ~/tmp
# Install GCC + Git
curl https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.7-v2.pkg > GCC-10.7-v2.pkg
sudo installer -pkg GCC-10.7-v2.pkg -target /