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
http://www.hollisterco.com/shop/wd/dudes-graphic-t-shirts-t-shirts/surfriders-beach-t-shirt-1423459_01 (white_and_pink) | |
http://www.hollisterco.com/shop/wd/dudes-short-sleeve-t-shirts/silver-strandt-shirt-1154870_02 (navy) | |
http://www.hollisterco.com/shop/wd/dudes-graphic-t-shirts-t-shirts/santa-monica-t-shirt-1155453_04 (white) |
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 User < ActiveRecord::Base | |
serialize :diversity, JSON | |
end |
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
window.fbAsyncInit = function() { | |
// init the FB JS SDK | |
FB.init({ | |
appId : '313930528750470', // App ID from the app dashboard | |
channelUrl : 'http://runway.tw/luckdraw/index.html', // Channel file for x-domain comms | |
status : true, // Check Facebook Login status | |
xfbml : true // Look for social plugins on the page | |
}); | |
FB.login(function(response) { | |
if (response.authResponse) { |
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
def current_user_id | |
session["warden.user.user.key"][1][0] | |
end |
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
中國: 37 | |
HK: 77 | |
JP: 89 | |
Korea: 94 | |
澳門: 104 |
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
cart = [] | |
session[:cart].each do |key, value| | |
cart.push {product_id:key, amount:value} | |
end | |
Order.create cart |
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
cd ~ | |
sudo apt-get update | |
sudo apt-get install openjdk-7-jre-headless -y | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
# NEW WAY / EASY WAY | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.6.deb | |
sudo dpkg -i elasticsearch-0.20.6.deb |
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
.lb-conter a{ | |
color:#288bac; | |
text-decoration:underline; | |
} | |
.lb-conter a:hover{ | |
color:rgb(0, 153, 204); |
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
<html> | |
<head> | |
<title>Client-side resizing example</title> | |
</head> | |
<body> | |
<input id="file-uploader" type="file"/> | |
<!-- <p>Image to use:</p> | |
<img id="cat" src="./cat.jpg" alt="The Scream" > --> |
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
#controller這樣寫: | |
class ConsultantController << ApplicationController | |
# routing: post "consultant/create" => "consultant#create" | |
def create | |
Consultant.create params[:consultant] | |
end | |
end | |
#view這樣寫: | |
<form action="/consultant/create" method="post"> |