Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.
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
#!/usr/bin/env /usr/local/rvm/wrappers/ruby-1.9.2-p290@puppet/ruby | |
## Used by M/Monit to send prowl alerts | |
require 'rubygems' | |
require 'optparse' | |
# everyone's API keys | |
contact_info = { | |
"grant"=>{"key"=>"my_api_key"} |
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 'mechanize' | |
@username = '[email protected]' | |
@password = 'hi2u' | |
@download_path = File.expand_path 'downloads' | |
@wget_cookie = File.expand_path(File.dirname(__FILE__)) + '/wget-cookies.txt' | |
unless File.directory? @download_path | |
puts "@{download_path} doesn't exist!" | |
exit |
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
<ASNDetails><ASNs><ASNNo>1000000050</ASNNo><CustmorOrderNo>LES20130422</CustmorOrderNo><Type>IR</Type><ExpectedArriveTime>2013-04-23 11:04:00</ExpectedArriveTime><Details><Detail><SkuCode>T3PBC1-6806</SkuCode><ReceivedTime>2013-04-22 14:04:26</ReceivedTime><ExpectedQty>1000</ExpectedQty><ReceivedQty>1000</ReceivedQty><Lotatt01></Lotatt01><Lotatt02></Lotatt02><Lotatt03></Lotatt03><Lotatt04></Lotatt04><Lotatt05></Lotatt05><Lotatt06>null</Lotatt06><Lotatt07></Lotatt07><Lotatt08></Lotatt08><Lotatt09></Lotatt09><Lotatt10></Lotatt10><Lotatt11></Lotatt11><Lotatt12></Lotatt12></Detail><Detail><SkuCode>C2IBGE14IPE14-6850< | |
/SkuCode><ReceivedTime>2013-04-22 14:04:26</ReceivedTime><ExpectedQty>1000</ExpectedQty><ReceivedQty>1000</ReceivedQty><Lotatt01></Lotatt01><Lotatt02></Lotatt02><Lotatt03></Lotatt03><Lotatt04></Lotatt04><Lotatt05></Lotatt05><Lotatt06>null</Lotatt06><Lotatt07></Lotatt07><Lotatt08></Lotatt08><Lotatt09></Lotatt09><Lotatt10></Lotatt10><Lotatt11></Lotatt11><Lotatt12></Lotatt12></Detail><Detail><SkuCode>C2 |
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
#Include vs. Extend | |
#You can either use include or extend to mix in a module’s functionality into a class. The difference is this: | |
#include makes the module’s methods available to the instance of a class, while | |
#extend makes these methods available to the class itself. | |
require "benchmark" | |
include Benchmark |
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
# 推送入库通知单至仓库 可以返回 SKU不存在 | |
1.9.3p327 :144 > Bml.new.ans_to_wms | |
HTTPI GET request to 58.210.118.230 (net_http) | |
SOAP request: http://58.210.118.230:9021/order/BMLservices/BMLQuery | |
SOAPAction: "ansToWms", Content-Type: text/xml;charset=UTF-8, Content-Length: 1030 |
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
response = TaobaoQuery.get({method: 'taobao.logistics.companies.get', fields: 'code,name'}, 100) |
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
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://old-releases.ubuntu.com/ubuntu/ maverick main restricted | |
deb-src http://old-releases.ubuntu.com/ubuntu/ maverick main restricted | |
deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates main restricted | |
deb-src http://old-releases.ubuntu.com/ubuntu/ maverick-updates main restricted | |
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu | |
## team. Also, please note that software in universe WILL NOT receive any | |
## review or updates from the Ubuntu security team. | |
deb http://old-releases.ubuntu.com/ubuntu/ maverick universe |
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
Started GET "/api/trades?trade_type=all" for 127.0.0.1 at 2013-01-21 16:38:32 +0800 | |
Processing by TradesController#index as JSON | |
Parameters: {"trade_type"=>"all"} | |
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 6 LIMIT 1 | |
(0.2ms) SELECT COUNT(*) FROM `roles` INNER JOIN `users_roles` ON `roles`.`id` = `users_roles`.`role_id` WHERE `users_roles`.`user_id` = 6 AND (((roles.name = 'seller') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) | |
(0.2ms) SELECT COUNT(*) FROM `roles` INNER JOIN `users_roles` ON `roles`.`id` = `users_roles`.`role_id` WHERE `users_roles`.`user_id` = 6 AND (((roles.name = 'interface') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) | |
(0.2ms) SELECT COUNT(*) FROM `roles` INNER JOIN `users_roles` ON `roles`.`id` = `users_roles`.`role_id` WHERE `users_roles`.`user_id` = 6 AND (((roles.name = 'logistic') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) | |
MOPED: 127.0.0.1:27017 COMMAND |
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
# 所有订单列 | |
{ | |
'trade_source' => '订单来源', | |
'tid' => '订单编号', | |
'status' => '当前状态', | |
'status_history' => '状态历史', | |
'receiver_name' => '客户姓名', | |
'receiver_mobile_phone' => '联系电话', | |
'receiver_address' => '联系地址', | |
'buyer_message' => '客户留言', |