diff options
author | makefu <github@syntax-fehler.de> | 2011-07-31 04:17:35 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2011-07-31 04:17:35 +0200 |
commit | 2556c9d78ca81e5851120e8eae7fae2eb70dbbaa (patch) | |
tree | 2da48b2e1c49d1168d32238c3f44664635605f5c | |
parent | 3fcf62b35d3a7e05d08f124c033b0aaf97ec5982 (diff) | |
parent | d66d3a0d37ceeab54a1e6c6b20643bee724e7705 (diff) |
Merge branch 'master' of github.com:krebscode/painload
-rw-r--r-- | .gitmodules | 15 | ||||
-rwxr-xr-x | btc/mtgox/mtgox.getDepth | 3 | ||||
-rwxr-xr-x | btc/mtgox/mtgox.getTrades | 3 | ||||
-rwxr-xr-x | btc/mtgox/mtgox.ticker | 4 | ||||
-rw-r--r-- | db/User-Agent.txt | 19 | ||||
m--------- | submodules/github/NV/cssom | 0 | ||||
m--------- | submodules/github/mikeal/request | 0 | ||||
m--------- | submodules/github/tautologistics/node-htmlparser | 0 | ||||
m--------- | submodules/github/tmpvar/jsdom | 0 | ||||
m--------- | submodules/github/visionmedia/query | 0 | ||||
-rwxr-xr-x | util/bin/randline | 1 | ||||
-rwxr-xr-x | util/bin/translate.google | 42 |
12 files changed, 86 insertions, 1 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..ed0cb4ed --- /dev/null +++ b/.gitmodules @@ -0,0 +1,15 @@ +[submodule "submodules/github/visionmedia/query"] + path = submodules/github/visionmedia/query + url = https://github.com/visionmedia/query +[submodule "submodules/github/tmpvar/jsdom"] + path = submodules/github/tmpvar/jsdom + url = https://github.com/tmpvar/jsdom +[submodule "submodules/github/mikeal/request"] + path = submodules/github/mikeal/request + url = https://github.com/mikeal/request.git +[submodule "submodules/github/NV/cssom"] + path = submodules/github/NV/cssom + url = https://github.com/NV/CSSOM +[submodule "submodules/github/tautologistics/node-htmlparser"] + path = submodules/github/tautologistics/node-htmlparser + url = https://github.com/tautologistics/node-htmlparser diff --git a/btc/mtgox/mtgox.getDepth b/btc/mtgox/mtgox.getDepth new file mode 100755 index 00000000..9a607979 --- /dev/null +++ b/btc/mtgox/mtgox.getDepth @@ -0,0 +1,3 @@ +#! /bin/sh +# get mtgox market depth +$ curl -ksS https://mtgox.com/code/data/getDepth.php diff --git a/btc/mtgox/mtgox.getTrades b/btc/mtgox/mtgox.getTrades new file mode 100755 index 00000000..73e5a68d --- /dev/null +++ b/btc/mtgox/mtgox.getTrades @@ -0,0 +1,3 @@ +#! /bin/sh +# get mtgox last trades +$ curl -ksS https://mtgox.com/code/data/getTrades.phl diff --git a/btc/mtgox/mtgox.ticker b/btc/mtgox/mtgox.ticker new file mode 100755 index 00000000..b24dfb35 --- /dev/null +++ b/btc/mtgox/mtgox.ticker @@ -0,0 +1,4 @@ +#! /bin/sh +# get mtgox ticker data +set -euf +curl -ksS https://mtgox.com/code/data/ticker.php diff --git a/db/User-Agent.txt b/db/User-Agent.txt new file mode 100644 index 00000000..3ed1f91f --- /dev/null +++ b/db/User-Agent.txt @@ -0,0 +1,19 @@ +Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50215; .NET CLR 3.0.0450 +Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Trident/4.0; SV1; SpamBlockerUtility 4.7.5) +Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearch/slurp) +Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; GTB6.4; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0. +Mozilla/5.0 (Linux; U; Android 1.5; fr-fr, HTC Hero Build/CUPCAKE) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3/5/9 +Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 +Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB0.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.3 +Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 +Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) +Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 (.NET CLR 3.5.30729) +Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 +Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.2) +Opera/9.80 (Windows NT 5.1; U; en) Presto/2.5.22 Version/10.50 +Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR +Opera/9.80 (Macintosh; PPC Mac OS X; U; en) Presto/2.2.15 Version/10.10 +Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR +Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 +Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727) +Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 (.NET CLR 3.5.30729) diff --git a/submodules/github/NV/cssom b/submodules/github/NV/cssom new file mode 160000 +Subproject dacc6c3c9dc9676f68df056a44a0d5f92884cc0 diff --git a/submodules/github/mikeal/request b/submodules/github/mikeal/request new file mode 160000 +Subproject c99b8fcd706ae035f6248669b017ac2995e45f3 diff --git a/submodules/github/tautologistics/node-htmlparser b/submodules/github/tautologistics/node-htmlparser new file mode 160000 +Subproject d770be592d81d6b603d6197dc727ce89ad195d0 diff --git a/submodules/github/tmpvar/jsdom b/submodules/github/tmpvar/jsdom new file mode 160000 +Subproject 30bac996077fb0096ff2334f0e13939586ae31b diff --git a/submodules/github/visionmedia/query b/submodules/github/visionmedia/query new file mode 160000 +Subproject 02baed4f5eb2d22e3ebb0688243c97fe04e7b53 diff --git a/util/bin/randline b/util/bin/randline index 051734c5..df36b344 100755 --- a/util/bin/randline +++ b/util/bin/randline @@ -1,3 +1,2 @@ #! /bin/sh - cat | shuf | head -n 1 diff --git a/util/bin/translate.google b/util/bin/translate.google new file mode 100755 index 00000000..943675f4 --- /dev/null +++ b/util/bin/translate.google @@ -0,0 +1,42 @@ +#! /bin/sh +set -euf + +A=Mozilla +url=http://translate.google.com/ + +pwd="$(dirname "$(readlink -f "$0")")" + +for x in \ + "$pwd/../../submodules/github/tmpvar" \ + "$pwd/../../submodules/github/mikeal" \ + "$pwd/../../submodules/github/NV" \ + "$pwd/../../submodules/github/tautologistics" \ +; do + export NODE_PATH="`readlink -f "$x"`${NODE_PATH+:$NODE_PATH}" +done + +# ensure query is ready +(cd "$pwd/../.." && git submodule update --init) + +{ + for arg; do echo "$arg"; done | sed -rn ' + s/^--(.*=.*)/\1/p;t + s/.*/text="${text+$text }&"/p;t + ' + cat<<EOF + query() { + node "$(readlink -f "$pwd/../../submodules/github/visionmedia/query")" "\$@" + } + curl -sS -A "\${A-Mozilla}" \\ + -d "js=\${js-n}" \\ + -d "prev=\${prev-_t}" \\ + -d "hl=\${hl-en}" \\ + -d "layout=\${layout-2}" \\ + -d "eotf=\${eotf-1}" \\ + -d "sl=\${sl-auto}" \\ + -d "tl=\${tl-en}" \\ + -d "text=\$text" \\ + "$url" | + query '#result_box' text +EOF +} | sh |