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
--- ../samizdatco-nginx-http-auth-digest-bd1c86a/ngx_http_auth_digest_module.c.orig 2011-12-29 09:00:32.000000000 +0900 | |
+++ ../samizdatco-nginx-http-auth-digest-bd1c86a/ngx_http_auth_digest_module.c 2012-10-17 16:47:17.000000000 +0900 | |
@@ -401,13 +401,13 @@ | |
http_method.len = r->method_name.len+1; | |
http_method.data = ngx_pcalloc(r->pool, http_method.len); | |
if (http_method.data==NULL) return NGX_HTTP_INTERNAL_SERVER_ERROR; | |
- p = ngx_cpymem(http_method.data, r->method_name.data, r->method_end - r->method_name.data+1); | |
+ p = ngx_cpymem(http_method.data, r->method_name.data, r->method_name.len); | |
- ha2_key.len = http_method.len + r->uri.len + 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/bash | |
set -e | |
echo "## Unrar archive ##" | |
for f in $(find . -maxdepth 1 -type f -name "*.rar"); do | |
echo " - $f" | |
unrar x -o- -p- -xshareraws.blogspot.com.url -y -inul $f | |
done |
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
function searchLongRoute(waypoints) { | |
var route; | |
var unit = 10; | |
var unit_num = Math.ceil((waypoints.length+Math.ceil(waypoints.length/unit)-1)/unit); | |
for (var start_num = 0; start_num < waypoints.length-1;) { | |
var s = waypoints[start_num]; | |
var next_start = ((waypoints.length>=start_num+unit)?(start_num+unit):(waypoints.length))-1; | |
var e = waypoints[next_start]; | |
var w = waypoints.slice(start_num+1, next_start); |
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/bash | |
set -e | |
shopt -s nocasematch | |
function print_usage { | |
echo "[Usage] $0 input-files dark-frame output-filename [dcraw_option]" | |
} | |
function print_header { | |
echo -e "\033[0;34m==> \033[0;35m$1\033[0m" |
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/bash | |
set -e | |
function genfn { | |
printf "s%02d-%04d.ppm" $1 $2; | |
} | |
function print_usage { | |
echo "[Usage] $0 dark-frame [dcraw_option]" | |
} |
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
string.split_it = function(str, sep) | |
if str == nil then return nil end | |
assert(type(str) == "string", "str must be a string") | |
assert(type(sep) == "string", "sep must be a string") | |
return string.gmatch(str, "[^\\" .. sep .. "\n]+") | |
end | |
string.split = function(str, sep) | |
local ret = {} | |
for seg in string.split_it(str, sep) do | |
ret[#ret+1] = seg |
NewerOlder