This file contains 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
168.143.161.20 twitter.com | |
168.143.161.20 www.twitter.com | |
128.121.146.229 assets0.twitter.com | |
128.121.146.229 assets1.twitter.com | |
128.121.146.101 static.twitter.com | |
128.121.146.229 assets2.twitter.com | |
128.121.146.229 assets3.twitter.com | |
65.74.185.41 twitter.zendesk.com | |
65.74.185.41 help.twitter.com |
This file contains 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
100 = :continue | |
101 = :switching_protocols | |
102 = :processing | |
200 = :ok | |
201 = :created | |
202 = :accepted | |
203 = :non_authoritative_information | |
204 = :no_content | |
205 = :reset_content | |
206 = :partial_content |
This file contains 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
# some more ls aliases | |
alias ll='ls -l' | |
alias la='ls -A' | |
alias l='ls -CF' | |
alias h='history' | |
# rails | |
alias r='rake' | |
alias ss='./restart_service.sh' | |
alias sg='script/generate' |
This file contains 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 File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
module FinanceRecordSpecHelper | |
def valid_attributes | |
{ | |
:item_type => "YinsouRecord", | |
:currency => "CNY", | |
:price => 500.12, | |
:loading_bill => LoadingBill.first, | |
:remark => "remark", | |
:state => "可付" |
This file contains 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
# String random | |
class String | |
def self.random(length=10) | |
chars = ('a'..'z').to_a + ('A'..'Z').to_a + ("0".."9").to_a + ['_'] | |
hash = ""; length.times { hash << chars[rand(chars.size)] }; hash | |
end | |
end |
This file contains 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 append_tree_child(node) | |
javascript_tag <<-js | |
if(window.top.Agi) { | |
var tree = window.top.Agi.Eip.navTree; | |
tree.getSelectionModel().getSelectedNode().appendChild(#{node.to_ext_tree_node.to_json}) | |
} | |
js | |
end |
This file contains 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
= snippet | |
String random : Gist 164989 | |
bash alias : Gist 162611 | |
rspec model test : Gist 163176 | |
merge git version : Gist 168847 | |
ext croe use google cdn : Gist 171726 | |
jquery croe use google cdn : Gist 144591 | |
jquery window popup a iframe : Gist 290d8e313ddea49752e8 | |
install agi-vim : Gist 173665 | |
shell gist : Gist 173672 |
This file contains 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
ENV["RAILS_ENV"] = "test" | |
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") | |
require 'test_help' | |
class ActiveSupport::TestCase | |
include AuthenticatedTestHelper | |
# Transactional fixtures accelerate your tests by wrapping each test method | |
# in a transaction that's rolled back on completion. This ensures that the | |
# test database remains unchanged so your fixtures don't have to be reloaded |
This file contains 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
$ git remote add -f defunkt git://github.com/defunkt/grit.git | |
$ git checkout -b defunkt/master | |
$ git pull defunkt master:4f0ea0c | |
$ git checkout master | |
$ git merge defunkt/master | |
$ git push |
This file contains 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> | |
<script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
<script type="text/javascript" language="javascript"> | |
google.load("ext-core", "3.0.0"); | |
</script> | |
<script type="text/javascript" language="javascript"> | |
Ext.onReady(function() { |