master 永远处于稳定状态,这个分支代码可以随时用来部署。不允许在该分支直接提交代码。
开发分支,包含了项目最新的功能和代码,所有开发都在 develop 上进行。一般情况下小的修改直接在这个分支上提交代码。
#!/usr/bin/env ruby | |
require 'net/telnet' | |
cache_dump_limit = 100 | |
localhost = Net::Telnet::new("Host" => "localhost", "Port" => 11211, "Timeout" => 3) | |
slab_ids = [] | |
localhost.cmd("String" => "stats items", "Match" => /^END/) do |c| | |
matches = c.scan(/STAT items:(\d+):/) | |
slab_ids = matches.flatten.uniq | |
end |
// ==UserScript== | |
// @name AlphaTaxi | |
// @namespace http://yesmeck.com | |
// @description 阿尔法城出租车 | |
// @include http://alphatown.com/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js | |
// @version 1.0 | |
// ==/UserScript== | |
$(function() { |
获取讨论列表GET https://api.douban.com/v2/target/:id/discussions
这里的 target 是不是要替换成 movie、book 这样的?不管我怎么弄都是返回 404。
% http GET https://api.douban.com/v2/target/1915561/discussions -v
GET /v2/target/1915561/discussions HTTP/1.1
Accept: */*
Accept-Encoding: identity, deflate, compress, gzip
Host: api.douban.com
User-Agent: HTTPie/0.3.0
% http --form POST https://api.douban.com/v2/movie/reviews Authorization:"Bearer a427972a77c120c4e576c57f6743624c" movie=07931 title=测试 content="因为,绳命,是剁么的回晃;绳命,是入刺的井猜。壤窝们,巩痛嘱咐碰优。田下冯广宰饿妹,饿妹冯广宰呲呲处。壤窝们,嘱咐这缩优类缩优。开心的一小,火大的一小,壤绳命,梗楤容,壤绳命,梗秤巩,壤绳命,梗回晃。" rating=5 -v | |
POST /v2/movie/reviews HTTP/1.1 | |
Accept-Encoding: identity, deflate, compress, gzip | |
Accept: */* | |
User-Agent: HTTPie/0.2.7 | |
Host: api.douban.com | |
Content-Type: application/x-www-form-urlencoded; charset=utf-8 | |
Authorization: Bearer a427972a77c320c4ec76c57f6743624c | |
movie=1307931&title=%E6%B5%8B%E8%AF%95&content=%E5%9B%A0%E4%B8%BA%EF%BC%8C%E7%BB%B3%E5%91%BD%EF%BC%8C%E6%98%AF%E5%89%81%E4%B9%88%E7%9A%84%E5%9B%9E%E6%99%83%EF%BC%9B%E7%BB%B3%E5%91%BD%EF%BC%8C%E6%98%AF%E5%85%A5%E5%88%BA%E7%9A%84%E4%BA%95%E7%8C%9C%E3%80%82%E5%A3%A4%E7%AA%9D%E4%BB%AC%EF%BC%8C%E5%B7%A9%E7%97%9B%E5%98%B1%E5%92%90%E7%A2%B0%E4%BC%98%E3%80%82%E7%94%B0%E4%B8%8B%E5%86%AF%E5%B9%BF%E5%AE%B0%E9%A5%BF%E5%A6%B9%EF%BC%8C%E9%A5%BF%E5%A6%B9%E5%86%AF%E5%B9%BF%E5%AE%B0%E5%91%B2%E5%A4%84%E3%80%82%E5%A3%A |
#!/bin/bash | |
puts() { | |
echo $1 | |
} | |
puts '*' |
apt-get install build-essential linux-headers-`uname -r` |
# /etc/network/interfaces | |
# This file describes the network interfaces available on your system | |
# and how to activate them. For more information, see interfaces(5). | |
# The loopback network interface | |
auto lo | |
iface lo inet loopback | |
# The primary network interface | |
auto eth0 |
#!/usr/bin/env bash | |
# | |
# Usage: | |
# | |
# ./pastbin.sh FILE | |
# | |
file=$1 | |
ext=$(echo $file | grep -oP '\..{2,3}' | grep -oP '[a-z]+') |