dormando - Cache your sessions. Don’t piss off your users
dormando - Cache your sessions. Don’t piss off your users.
Article about using memcached and mysql together for esssions. Common sense, but good.
dormando - Cache your sessions. Don’t piss off your users.
Article about using memcached and mysql together for esssions. Common sense, but good.
Linux: Download all file from ftp server recursively.
Yes, I did need to recursively download a directory over FTP from the command line. Something that I’ve never had to do.
This is how. It’s easy with the right tools.
Digg the Blog » Blog Archive » Master of Puppets #1: ralsh.
I’ve even heard of puppet, and tried to use it. Complicated to setup for only 10 or so servers.
Almost cool out of the box, but not quite.
Well, it’s only not cool because the ruby gem for mysql blocks the _entire_ ruby process when it runs. Spiffy.
Don’t forget to translate the htaccess file. I’ve done it for you:
if ( $args ~ "mosConfig_[a-zA-Z_]{1,21}(=|\%3d)” ) {
set $args “”;
rewrite ^.*$ http://$host/index.php last;
return 403;
}
if ( $args ~ “base64_encode.*\(.*\)” ) {
set $args “”;
rewrite ^.*$ http://$host/index.php last;
return 403;
}
if ( $args ~ “(\<|%3C).*script.*(\>|%3E)” ) {
set $args “”;
rewrite ^.*$ http://$host/index.php last;
return 403;
}
if ( $args ~ “GLOBALS(=|\[|\%[0-9A-Z]{0,2})” ) {
set $args “”;
rewrite ^.*$ http://$host/index.php last;
return 403;
}
if ( $args ~ “_REQUEST(=|\[|\%[0-9A-Z]{0,2})” ) {
set $args “”;
rewrite ^.*$ http://$host/index.php last;
return 403;
}
…that a Linux system will remain running when all of the files (yes, all of them) are owned by a non-root user? Neither did I.
It’s not very much good for anything, but it won’t crash.
I’m a sad panda that I now know this.
If you’re trying to install OpenSolaris in Parallels, and you’re getting crappy UART errors and nothings working, try creating two serial ports for the virtual machine. They can just output to text files, but they have to exists.
That cleared my issue right up.
Need to know how to prefix a bunch of lines in vim? Say, to comment them all out? Easy.
Mark the top line. (ma)
Mark the bottom line. (mb)
Search and replace between the marks (:'a,'bs/^/#/g will insert a hash symbol)
So. You’ve started using git, and it’s awesome. You branched, and made a whole set of changes. Then you merged them into your master revision. Now you try and svn dcommit, and nothing happens. What??!
Easy killer. Just `git svn rebase`, *then* `git svn dcommit` and you’ll be all set.
How do I use class eval? Like this.