Skip to content

Instantly share code, notes, and snippets.

View sorrycc's full-sized avatar
🌻
Working on UmiJS

chencheng (云谦) sorrycc

🌻
Working on UmiJS
View GitHub Profile
// ==UserScript==
// @name 增加跳到收银台的链接.
// @version 0.1
// @match http://consumeprod.stable.alipay.net/*
// @copyright 2013+, 云谦
// ==/UserScript==
var els = document.querySelectorAll("p.consume-title a");
for (var i=0; i<els.length; i++) {
@sorrycc
sorrycc / pinboard.js
Created December 5, 2013 08:37
Pinboard Add.
// ==UserScript==
// @name Pinboard Add Script.
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @match http://*/*
// @match https://*/*
// @copyright 2012+, You
// ==/UserScript==
@sorrycc
sorrycc / bacon.js
Created November 8, 2013 08:20
测试 new Image() 请求是否会阻塞 window.onload
<script>
new Image().src = "http://10.232.36.153/";
window.onload = function() {
alert(1);
};
</script>
require "open-uri"
data = []
while true
item = open("https://api.github.com/zen").read
if data.index(item) == nil
p item
data.push item
end
end
<!doctype html>
<html>
<body>
<div id="list"></div>
</body>
</html>
<script type="text/html" id="users">
11446911
2374833
// ==UserScript==
// @name AliWay Script.
// @version 0.2
// @match http://www.aliway.com/*
// @copyright 2012+, You
// ==/UserScript==
// 删水印
$("div.tpc_content").removeClass("tpc_content").css("padding", "0 15px 20px 15px").css("line-height", "1.5");
@sorrycc
sorrycc / gist:6180552
Created August 8, 2013 01:06
QQ Status Test Script. (Fail)
curl -I -H "Host: wpa.qq.com" -H "Connection: keep-alive" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36" -H "Accept-Encoding: gzip,deflate,sdch" -H "Accept-Language: zh-CN,zh;q=0.8" "http://wpa.qq.com/pa?p=1:64455361:1"
require "net/http"
def get_diff_percentage(url)
res = nil
res_webp = nil
url.sub!("http://", "")
server, *path = url.split("/")
path = "/#{path.join("/")}"
path_webp = "#{path}_.webp"
Process: AliWangwang [48626]
Path: /Applications/AliWangwang.app/Contents/MacOS/AliWangwang
Identifier: com.taobao.aliwangwang
Version: 3.0.4 (2596)
Code Type: X86 (Native)
Parent Process: launchd [137]
User ID: 501
Date/Time: 2013-03-06 10:48:27.253 +0800
OS Version: Mac OS X 10.8.2 (12C60)
set the_array to {}
tell application "Finder"
set these_items to the selection
end tell
repeat with i from 1 to the count of these_items
set end of the_array to ""
set this_item to (item i of these_items) as text
tell application "TPSMate"