TAG | perl
Mar/10
25
Truncate a table with DBIC (DBIx::Class) in your Catalyst app
No comments · Posted by admin in code
Dec/09
22
clone partition table from one hard drive to another (one step)
No comments · Posted by admin in one-liners
Dec/09
2
Easiest commandline search and replace that I know
No comments · Posted by admin in code, one-liners
perl -pi -e 's/$findstr/$replacestr/g' file1 [file2, file3...]
It does not get much better than that. You get the benefit of Perl’s superior regex engine (sed is nice but it just can’t compare), and oooooooo baby it’s fast! Perl was made to process text!
Dec/09
2
Nginx fastcgi configuration example for a Perl Catalyst Application Server
No comments · Posted by admin in code, configs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | server {
listen 80;
server_name YOURDOMAIN;
access_log /var/log/nginx/access.log;
location / {
fastcgi_pass unix:/PATH/TO/YOUR/CATALYST_APP/fastcgi.socket;
include fastcgi_params;
}
location /static {
root /PATH/TO/YOUR/CATALYST_APP/root;
}
}
# LAST STEP: START YOUR CATALYST APP LIKE THIS FROM AN INIT SCRIPT OR IN A SCREEN SESSION:
# $ sudo -u www-data /PATH/TO/YOUR/CATALYST_APP/script/MYAPP_fastcgi.pl -n 10 -l fastcgi.socket -e 2>&1 |

