HTTP Header(必须包括):
{
"Content-Type":"application/json",
"X-App-Token":"应用密钥"
}
.DS_Store |
# sudo ln -s ~/nginx.conf unicorn.conf | |
upstream app_server { | |
server unix:/tmp/unicorn_padrino.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
charset utf-8; | |
server_name db.innshine.com; |
<body> | |
<sign signid='0'> | |
<style type='text/css'> | |
#signature{font-size:13px;font-family:'STHeiti Light';color:#9fa0a0} | |
#signature .b{font-size:21px;font-weight:700;margin-right:60px} | |
#signature .s{font-size:11px;font-style:italic} | |
#signature dl,#signature a{line-height:2;color:#9fa0a0} | |
#signature dl dt{width:60px;float:left;text-align:right;margin:0 .5em} | |
#signature dl dt:after{content:" : "} | |
#signature .logo{padding-right:13px;background:#fff;border-bottom-right-radius:18px;margin-bottom:-27px} |
# -*- encoding: utf-8 -*- | |
require 'digest/md5' | |
require 'nestful' | |
class Smsbao | |
def initialize(login, passwd) | |
@login = login | |
@passwd = Digest::MD5.hexdigest(passwd.to_s) | |
end |
String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | |
String seller = "onitsukatiger官方旗舰店"; | |
// 同步队列 | |
SyncQueue ot = OT.orderQueue(seller, today); | |
Query sql = dbconn.createQuery("from Trade where seller_nick = ? and status = ? and (end_time between ? and ?)"); | |
sql.setString(0, seller); | |
sql.setString(1, "TRADE_FINISHED"); | |
sql.setString(2, today + " 00:00:00"); | |
sql.setString(3, today + " 23:59:59"); |
user = User.all[11] | |
def get_value(cid, properties) | |
prop_ids = properties.split(':') | |
prop = ItemProp.where(_id: "#{cid}-#{prop_ids[0]}").first | |
return nil if prop.nil? | |
prop_value = prop.prop_values.where(vid: prop_ids[1]).first | |
return nil if prop_value.nil? | |
prop_value.name |
# -*- encoding: utf-8 -*- | |
require 'wiringpi' | |
class Pi | |
def initialize(pins) | |
@pins = pins | |
@io = WiringPi::GPIO.new | |
@io.wiringPiMode(WPI_MODE_GPIO) |
# 获取购买记录 | |
def get_trades(crawler, item_id, seller_id, item_sbn, page=1) | |
start_at = Date.yesterday.beginning_of_day.to_i * 1000 | |
end_at = Date.yesterday.end_of_day.to_i * 1000 | |
# 购买列表 |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $syslog $remote_fs | |
# Required-Stop: $syslog $remote_fs | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: nginx - Persistent key-value db |