Skip to content

Instantly share code, notes, and snippets.

View waghanza's full-sized avatar
🚀
Always learning

Marwan Rabbâa waghanza

🚀
Always learning
View GitHub Profile
@waghanza
waghanza / nginx.conf
Created March 5, 2012 15:15 — forked from thewebfellas/nginx.conf
sample nginx.conf for thin
user nginx;
worker_processes 5;
error_log /var/log/nginx.error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@waghanza
waghanza / JSClosureCompiler.pm
Created March 20, 2012 16:55
Minify your JS file
package JSClosureCompiler;
use nginx;
use WebService::Google::Closure;
#to make sure we write UTF-8 files
use open OUT => ':utf8';
sub handler {
my $r=shift;
my $cache_dir="/tmp"; # Cache directory where optimized files will be kept
@waghanza
waghanza / Minify.pm
Created March 20, 2012 16:57
Minify your CSS file
package Minify;
use nginx;
use CSS::Minifier::XS;
sub css_handler {
my $r = shift;
my $cache_dir="/tmp";
my $cache_file=$r->uri;
$cache_file=~s!/!_!g;
$cache_file=join("/", $cache_dir, $cache_file);
@waghanza
waghanza / Minify.pm
Created March 22, 2012 10:47
Minify your CSS file / with GZIP
package CSSMinify;
use nginx;
use CSS::Minifier qw(minify);
use IO::Compress::Gzip ;
sub handler {
my $r=shift;
my $cache_dir="/tmp"; # Cache directory where minified file will be
kept
my $cache_file=$r->uri;
sb-impl::*default-external-format* :UTF-8
tmpdir: #P"/tmp/pgloader/"
2015-10-22T12:41:59.032000Z NOTICE Starting pgloader, log system is ready.
2015-10-22T12:41:59.050000Z INFO Starting monitor
2015-10-22T12:41:59.057000Z LOG Main logs in '/tmp/pgloader/pgloader.log'
2015-10-22T12:41:59.057000Z LOG Data errors in '/tmp/pgloader/'
2015-10-22T12:41:59.057000Z LOG Parsing commands from file #P"/tmp/sqlite.load"
2015-10-22T12:41:59.057000Z DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres@127.0.0.1:5432/test {10093F5423}>
2015-10-22T12:41:59.057000Z DEBUG SET work_mem TO '16MB'
2015-10-22T12:41:59.057000Z DEBUG SET maintenance_work_mem TO '512 MB'
import tornado.httpserver
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write('')
import tornado.httpserver
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write('')
import tornado.httpserver
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write('')
import tornado.httpserver
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write('')
import tornado.httpserver
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write('')