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
| > use test | |
| switched to db test | |
| > db.start.insert({name: 1}) | |
| > db.start.insert({name: 2}) | |
| > db.start.insert({name: 3}) | |
| > db.start.insert({name: 4}) | |
| > db.start.insert({name: 5}) | |
| > db.start.insert({name: 6}) | |
| > db.start.insert({name: 7}) | |
| > db.start.insert({name: 8}) |
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
| # from socket import gethostbyname as native_gethostbyname | |
| # from socket import getaddrinfo as native_getaddrinfo | |
| # import sys | |
| # from gevent.socket import gethostbyname as green_gethostbyname | |
| from gevent.socket import gethostbyname, getaddrinfo | |
| from gevent.dns import resolve_ipv4 | |
| def get_addr(*args, **kwargs): | |
| print "ADDR: RESOLVING!!!" | |
| result = getaddrinfo(*args, **kwargs) |
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
| diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst | |
| index ca85a34..42d3e71 100644 | |
| --- a/docs/user/advanced.rst | |
| +++ b/docs/user/advanced.rst | |
| @@ -217,7 +217,7 @@ argument. | |
| :: | |
| - def print_url(r): | |
| + def print_url(r, request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies): |
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
| class CategoryForm(BaseForm): | |
| name = TextField("Category Name: ") | |
| description = TextAreaField("Category description: ") | |
| # child = Select2Field("ChildCats: ", coerce=int) | |
| # parent_id = Select2TagsField("ChildCats: ", ) | |
| parent_id = SelectMultipleField("ChildCats: ", coerce=int) |
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
| sape.toolbar.ext.utSearchLink = function(data, url) | |
| { | |
| var url = url.toLowerCase(); | |
| if (data.indexOf('a href="' + url + '"') > 0) return true; | |
| if (data.indexOf("a href='" + url + "'") > 0) return true; | |
| var host = url.split("/")[2].replace(/^www\./i, ''); | |
| var tail = url.replace(/^http(s)?[\/\:]*/i, '').replace(/^[^\/]*[\/]?/i, '').replace(/^index\.([a-z]{3,5})/i, '').replace(/\#(.*)$/i, '').replace(/index\.([a-z]{3,5})$/i, ''); | |
| var tail_dec = unescape(tail); |
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
| BEGIN{ | |
| system("ionice -c3 -p " PROCINFO["pid"]); | |
| system("renice -n 19 -p " PROCINFO["pid"]); | |
| dir_len = 0 | |
| while ("ls -1 /var/www" | getline) { | |
| dirs[dir_len++] = $0 | |
| } | |
| for(i=0;i<dir_len;i++){ |
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
| if test -d .hg | |
| set -g __hg_branch (hg branch 2> /dev/null) | |
| set -g __hg_dirty (hg status 2> /dev/null | grep -v "?" | sort | uniq | head -c1) | |
| printf "%s@%s %s%s%s (%s%s%s%s%s)%s%s%s%s " $USER $__fish_prompt_hostname "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" (set_color -b 5fff5f) (set_color red) $__hg_branch (set_color normal) (set_color -b normal) (set_color red) $__hg_dirty (set_color normal) $user_prompt | |
| else | |
| printf '%s@%s %s%s%s%s%s ' $USER $__fish_prompt_hostname "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" $user_prompt | |
| end |
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
| cat /var/log/nginx/access.log.1 | cut -d " " -f1,4,7 | sed -r 's/^(.+)?:([0-9]{2}):([0-9]{2}):([0-9]{2})(.+)$/\1:\2:\3 \5/g' | awk '{print $2 " " $1 " " $3 }' | sort | uniq -c | sort -g | tail -n 1000 |
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
| mesg | |
| <6>[ 0.000000] Booting Linux on physical CPU 0 | |
| <6>[ 0.000000] Initializing cgroup subsys cpu | |
| <5>[ 0.000000] Linux version 3.4.0-gcb7e7de (tassadar@nymeria) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #4 SMP PREEMPT Wed Sep 4 18:22:32 CEST 2013 | |
| <4>[ 0.000000] CPU: ARMv7 Processor [511f06f0] revision 0 (ARMv7), cr=10c5387d | |
| <4>[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache | |
| <4>[ 0.000000] Machine: QCT APQ8064 FLO | |
| <2>[ 0.000000] Truncating memory at 0x90000000 to fit in 32-bit physical address space | |
| <6>[ 0.000000] cma: CMA: reserved 80 MiB at a0000000 | |
| <6>[ 0.000000] memory pool 3 (start 0xfe900000 size 1600000) initialized |
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
| eNrtWltygzAMrLX89Ay9Qv97lt7/Ii0Qg2SvjIE0DRORyWsWWZa8kh9i+Bw+3r/T | |
| +1ca3o68QvCxgkn9SkPqE0xG8G1IfRqFvnbbmPbZuNqVggAhGIL90c8FO6KfCXZF | |
| /7aNaZ+Nm9FvBdNRr/6B4I6EfFmuvoKNlxeclnPiXxMKgL7Po4JRyfgX06/5vxh0 | |
| +pxEOHprAo4s8uW0vLZRoOoDFAXv8627WadFFzhrtugsOI6Mg4tKq+4t+mqj8nh0 | |
| 6TeDK+PsLZa8qxeN//QtgvG2tb3lNlEDMN5QjhHUEGY1GS14c4MX1PLmV78lhyXO | |
| 2D3DLMuc0QKXtDJbmPGS6JikV1igaXHzyto5LCE4N7JyN6Nz6K600qiUrEaJLl+q | |
| jyWqo9i2XDh7MdkGquBRecule1dCDTTQQAN9bTRSpY/m+RfhjUANWjMjfBWp8vIo | |
| 7LasSIb226DlFoDqdYMFejsXxHvOqbDMdzoZNsaXMKPWC09vxQy7Cz9mEaxq/Iuf | |
| /0tvpMo7psrmulGa68Z2uotkePFU2Vw3tscXTb04l+7umkgDjVTZPd8d2ESjPE3f | |
| pRcI4l0BxYHJjjBjF6+eke1X1vtEqfIOlfB1WnQr4U3UNOGUDXdXwskSgNbJxamT |