http://haml.info/docs/yardoc/file.REFERENCE.html#javascript-filter
HAML:
%script{:type => "text/javascript",
:src => "javascripts/script_#{2 + 7}"}
MathJax
#!/bin/bash | |
# fill in your username and password before | |
# invoking this script | |
post="buttonClicked=4&redirect_url=www.baidu.com%2F&err_flag=0&username=<<username>>&password=<<password>>" | |
wget --post-data "$post" http://1.1.1.1/login.html -O baidu.html |
#!/bin/bash | |
login_url="https://securelogin.wlan.cuhk.edu.hk/cgi-bin/login" | |
post_data="user=<username>&password=<password>&cmd=authenticate&Login=Log+In" | |
mkdir -p tmp | |
wget --secure-protocol=sslv3 $login_url --post-data="$post_data" -O tmp/login.html |
#!/bin/bash | |
template="http://widget.weibo.com/relationship/bulkfollow.php?language=zh_cn&uids=" | |
uids=`curl -s $1 | grep -oP '(?<=http://...\.sinaimg.cn/)\d*(?=/)' | xargs echo -n | tr ' ' ','` | |
url="$template$uids" | |
echo $url |
__\format[Authors()]{\author}__, \year, _" \title "_, \booktitle \journal |
''' | |
Convert RSS to timelineJS's JSON format | |
Usage: | |
rss2json.py <fn_rss> <fn_json> | |
''' | |
import docopt | |
arguments = docopt.docopt(__doc__) | |
fn_rss = arguments['<fn_rss>'] |
#!/usr/bin/env sh | |
# Download SNSAPI's CDE (64bit) package and cd into the environment. | |
# Execute ./snsali.py.cde after that. | |
# More info.: https://github.com/hupili/snsapi/wiki/Installation | |
if [ `uname -m` == "x86_64" ]; then | |
wl="64" | |
else | |
wl="32" | |
fi |
http://haml.info/docs/yardoc/file.REFERENCE.html#javascript-filter
HAML:
%script{:type => "text/javascript",
:src => "javascripts/script_#{2 + 7}"}
MathJax
Test setup:
Use time ./parasort.sh all-ids 500000 20
:
real 2m32.483s
user 10m52.996s