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
// ==UserScript== | |
// @version 1.0 | |
// @name Douban Rating | |
// @author Zhou Meng | |
// @description Show Douban Rating in Douban List | |
// @include http://*.douban.com/doulist/* | |
// ==/UserScript== | |
if ('undefined' == typeof __PAGE_SCOPE_RUN__) { | |
//把当前脚本注入到页面 |
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
#!/usr/bin/env bash | |
# | |
# Usage: | |
# | |
# ./pastbin.sh FILE | |
# | |
file=$1 | |
ext=$(echo $file | grep -oP '\..{2,3}' | grep -oP '[a-z]+') |
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
# /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 |
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
apt-get install build-essential linux-headers-`uname -r` |
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
#!/bin/bash | |
puts() { | |
echo $1 | |
} | |
puts '*' |
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
% 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 |
获取讨论列表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
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
// ==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() { |