Atrixnet Code Share and Geek Resources | Can you grok it?

TAG | perl

$c->request->headers->user_agent
	

·

$c->model('DB')->storage->dbh->do('truncate table some_table');

· ·

sfdisk /dev/sdb <(sfdisk -d /dev/sda|perl -pi -e 's/sda/sdb/g')

· ·

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!

·

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

· · · · ·

Atrixnet is owned and operated by me, Tommy Butler. Sometimes I do contract networking/programming jobs. Contact me for my résumé

 

Atrixnet is
Atrixnet is Linux Powered! - click to visit www.linux.com
Wikipedia Affiliate Button