This file contains 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
location /udp { | |
content_by_lua ' | |
local rocks = require "luarocks.loader" | |
local socket = require "socket" | |
ngx.say("Ok.") | |
'; | |
} |
This file contains 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
012/01/16 09:02:56 [debug] 25983#0: *3 lua rewrite handler, uri "/udp" | |
2012/01/16 09:02:56 [debug] 25983#0: *3 lua reset ctx | |
2012/01/16 09:02:56 [debug] 25983#0: *3 lua creating new thread | |
2012/01/16 09:02:56 [debug] 25983#0: *3 lua run thread | |
2012/01/16 09:02:56 [debug] 25983#0: *3 lua resume returned 2 | |
2012/01/16 09:02:56 [error] 25983#0: *3 lua handler aborted: runtime error: /usr/local/share/lua/5.1/luarocks/loader.lua:113: error loading module 'socket.core' from file '/usr/local/lib/lua/5.1//socket/core.so': | |
ld.so.1: nginx: fatal: relocation error: file /usr/local/lib/lua/5.1//socket/core.so: symbol hstrerror: referenced symbol not found, client: 195.234.71.206, server: ~^storage\d+\.s\.raptorfiles\.com$, request: "GET /udp HTTP/1.1", host: "storage201.s.raptorfiles.com" | |
2012/01/16 09:02:56 [debug] 25983#0: *3 lua deleting thread | |
2012/01/16 09:02:56 [debug] 25983#0: *3 lua request cleanup | |
2012/01/16 09:02:56 [debug] 25983#0: *4 lua rewrite handler, uri "/favicon.ico" |
This file contains 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
nginx: nginx version: ngx_openresty/1.0.10.44 | |
nginx: built by gcc 4.6.2 (GCC) | |
nginx: configure arguments: --prefix=/usr/local/nginx --with-debug --with-cc-opt='-O0 -Wno-unused-but-set-variable' --add-module=../ngx_devel_kit-0.2.17 --add-module=../set-misc-nginx-module-0.22rc4 --add-module=../ngx_lua-0.4.0 --add-module=../headers-more-nginx-module-0.16 --add-module=../memc-nginx-module-0.13rc2 --add-module=../upstream-keepalive-nginx-module-0.7 --add-module=../rds-csv-nginx-module-0.04 --with-ld-opt=-Wl,-rpath,/usr/local/luajit/lib --conf-path=/usr/local/etc/openresty/openresty.conf --error-log-path=/var/log/openresty/error.log --http-log-path=/var/log/openresty/access.log --pid-path=/var/run/openresty.pid --add-module=/usr/local/src/bulldozer/.work/build/nginx-upload-progress-module-0.8.2 --add-module=/usr/local/src/bulldozer/.work/build/nginx_upload_module-2.2.0 --with-http_stub_status_module |
This file contains 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
git clone git://github.com/keplerproject/luarocks.git | |
cd luarocks | |
./configure --with-lua=/usr/local/luajit --with-lua-include=/usr/local/luajit/include/luajit-2.0 | |
PATH=/usr/gnu/bin:$PATH gmake | |
PATH=/usr/gnu/bin:$PATH gmake install | |
ln -s /usr/local/luajit/bin/luajit-2.0.0-beta8 /usr/local/luajit/bin/lua | |
PATH=/usr/gnu/bin:$PATH /usr/local/bin/luarocks install luasocket |
This file contains 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
#!/usr/bin/env tclsh | |
# 1. login to myspace.com | |
# 2. go to http://www.myspace.com/music/player | |
# 3. save page source | |
# 4. install rtmpdump (brew install --use-clang rtmpdump) | |
# 5. run this script with path to page source as parameter | |
proc flatten {list} { | |
while {1} { |
This file contains 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
#!/bin/sh | |
VOLUMES="rt/data:cryptodata:/data" | |
SERVICES="mysql" | |
for vol in $VOLUMES | |
do | |
unset status | |
encrypted_lv=`echo $vol | awk -F: '{print $1}'` | |
decrypted_device=`echo $vol | awk -F: '{print $2}'` |
This file contains 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
#!/usr/bin/env tclsh | |
set amount [lindex $::argv 0] | |
set coins_values [lrange $::argv 1 end] | |
proc max_coin { coin_list } { | |
lindex [lsort -integer $coin_list] end | |
} | |
proc xchange { val biggest } { |
This file contains 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
#!/usr/bin/env tclsh | |
set coins_pile $::argv | |
proc take_left {} { | |
global coins_pile | |
set taken [lindex $coins_pile 0] | |
set coins_pile [lreplace $coins_pile 0 0] |
This file contains 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
#!/usr/bin/env tclsh | |
set coins_pile $::argv | |
proc take_left {} { | |
global coins_pile | |
set taken [lindex $coins_pile 0] | |
set coins_pile [lreplace $coins_pile 0 0] |
This file contains 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
#!/usr/bin/env ruby | |
log = ARGV[0] | |
chunk = 1024 * 1024 * 50 # 50 Mb | |
cursor = 0 | |
cnt = 1 | |
file_size = File.stat(log).size |
OlderNewer