Skip to content

Instantly share code, notes, and snippets.

View rootatdarkstar's full-sized avatar

Alexander Grunin rootatdarkstar

View GitHub Profile
if o.limit && o.offset
o = o.dup
limit = o.limit.expr
offset = o.offset
o.offset = nil
collector << "
SELECT * FROM (
SELECT raw_sql_.*, rownum raw_rnum_
FROM ("
@rootatdarkstar
rootatdarkstar / nginx.conf
Created March 7, 2017 18:11 — forked from phpdude/nginx.conf
Nginx image filter + caching of results.
location /resize {
alias /tmp/nginx/resize;
set $width 150;
set $height 100;
set $dimens "";
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) {
set $width $1;
set $height $2;
set $image_path $3;