Re: http://www.reddit.com/r/webdev/comments/1rx96j/how_did_they_accomplish_the_ripple_effect_when/
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<title>dianrui · soft</title> |
##operation modle (目前这个就处理虚拟货币算了)
txid | user_id | coin_currcy_id | amount | status | category |
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
//= require jquery | |
//= require gigabase | |
$ = jQuery | |
class GigaFavoriteBtn | |
constructor: (element, options) -> | |
that = this | |
@$element = $(element) | |
if options.ajax_init and Gigabase.is_logged() |
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 MessageSidebar | |
constructor: (element) -> | |
$element = $(element) | |
compose_regex = "messages\/new" | |
inbox_regex = 'messages' | |
outbox_regex = "messages\/outbox" | |
archived_regex = "messages\/archived" | |
trash_regex = "messages\/trash" | |
if window.location.pathname.match(compose_regex) |
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
//= require jquery | |
//= require gigabase | |
$ -> | |
$('.infinitescroll_wrapper').each -> | |
$wrapper = $(this) | |
$wrapper.find('.feed-paging nav.pagination').hide() | |
$wrapper.infinitescroll | |
navSelector: "nav.pagination" | |
nextSelector: "nav.pagination .next a" |
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
# 更换源 | |
comment_lines "Gemfile", /source .http.*/ | |
add_source "http://ruby.taobao.org" | |
# HTML模板 | |
gem 'slim' | |
# 单点登录 | |
gem 'rubycas-client' | |
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
before_save :set_material_should_change_field | |
after_save :change_material_attributes | |
def set_material_should_change_field | |
option_changed_attributes = self.changed_attributes | |
@change_field = {} | |
if self.new_record? | |
@change_field.merge!( { :price => true, :lead_time => true } ) | |
elsif option_changed_attributes.include?('price_min') || option_changed_attributes.include?('price_max') |
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
coffee: | |
$wrapper = $('.js-infinitescroll-wrap') | |
$wrapper.find('.feed-paging nav.pagination').hide() | |
$wrapper.infinitescroll | |
navSelector: "nav.pagination" | |
nextSelector: "nav.pagination .next a" | |
itemSelector: ".js-infinitescroll-item" | |
bufferPx: 150 | |
loading: | |
img: "/assets/spinner.gif" |