select user,host from mysql.user;
Thursday, August 16, 2012
Monday, July 30, 2012
HTML select elements by css selectors
var arr = element.querySelectorAll( css_selector );
var first_elm = element.querySelector( css_selector );
https://developer.mozilla.org/en/DOM/Document.querySelectorAll
var first_elm = element.querySelector( css_selector );
https://developer.mozilla.org/en/DOM/Document.querySelectorAll
Wednesday, July 25, 2012
Saturday, July 7, 2012
Linux: Mount USB drive
- Plug the USB drive
- fdisk -l
- create a mounting folder. i.e. /media
- mount -t vfat /dev/sdb1 /media
To unmount
- umount /media
- fdisk -l
- create a mounting folder. i.e. /media
- mount -t vfat /dev/sdb1 /media
To unmount
- umount /media
Tuesday, July 3, 2012
Compress and split large files
# create archives
$ tar cz my_large_file_1 my_large_file_2 | split -d -b 1024MiB - myfiles_split.tgz_
# uncompress
$ cat myfiles_split.tgz_* | tar xz
This solution avoids the need to use an intermediate large file when (de)compressing. Use the tar -C option to use a different directory for the resulting files. btw if the archive consists from only a single file, tar could be avoided and only gzip used:
# create archives
$ gzip -c my_large_file | split -d -b 1024MiB - myfile_split.gz_
# uncompress
$ cat myfile_split.gz_* | gunzip -c > my_large_file
Wednesday, June 27, 2012
Apache Performance Tuning
http://httpd.apache.org/docs/2.0/misc/perf-tuning.html
Performance Related settings:
EnableMMAP Off // default is ON
Subscribe to:
Posts (Atom)