- 下載安裝AppServ 2.5.10,Mac請使用MAMP,Mac請記得關閉設定中的Apache伺服器。
- 下載WordPress 3.6.1
- 連線至http://localhost檢查是否可以連線,Mac在MAMP設定即可
- 連線至http://localhost設定wordpress資料庫,Mac在MAMP設定即可
- 將wordpress資料夾放到C:\AppServ\www底下,Mac在 /Applications/MAMP/htdocs
- 連線至http://localhost/wordpress進行設定
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
# app/model/ | |
# Your model where you've defined has_attached_file | |
# Do not define :original in your styles | |
class Asset < ActiveRecord::Base | |
attr_accessible :position, :picture_cover, :asset | |
belongs_to(:assetable, :polymorphic => true) | |
has_attached_file :asset, | |
:styles => { |
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
.page | |
header.header | |
.logo | |
img src="/logo.jpg" | |
nav | |
ul.links | |
li= link_to '#' | |
article#content | |
#main | |
section |
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
#!/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 / |
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
+---------+------------+------------------+--------------------------------------------------------------+ | |
| 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 |
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
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"] } |
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
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] ) |
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
### 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: |