Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
function highlightWord(root, word, className) { | |
// base on https://stackoverflow.com/a/10730063 | |
// word is lower-case | |
var walker, textNodes = []; | |
walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT, { | |
acceptNode: function (node) { | |
if (node.nodeType === Node.TEXT_NODE && node.textContent.toLowerCase().indexOf(word) >= 0) { | |
return NodeFilter.FILTER_ACCEPT; | |
} else { |
// | |
// _oo0oo_ | |
// o8888888o | |
// 88" . "88 | |
// (| -_- |) | |
// 0\ = /0 | |
// ___/`---'\___ | |
// .' \\| |// '. | |
// / \\||| : |||// \ | |
// / _||||| -:- |||||- \ |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/usr/bin/python | |
import wave | |
import numpy | |
import struct | |
import sys | |
import csv | |
from scikits.samplerate import resample | |
def write_wav(data, filename, framerate, amplitude): |
/* | |
12306 Auto Query => A javascript snippet to help you book tickets online. | |
Copyright (C) 2011-2012 Jingqin Lynn | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes Sizzle.js |
This is now an actual repo: