Split files on lines
Split the file into multiple files at every 3rd line . i.e, First 3 lines into F1, next 3 lines into F2 and so on:
$ awk 'NR%3==1{x="F"++i;}{print > x}' filename
Split the file into multiple files at every 3rd line . i.e, First 3 lines into F1, next 3 lines into F2 and so on:
$ awk 'NR%3==1{x="F"++i;}{print > x}' filename
Not a random node filter, but to display one of several images of a node in any list or display. Useful for several of my clients but not standard.
First of all:
Create a simple user with ssh login:
cd /var/files/test
find -type d -exec chmod 0777 {} \;
function getNumPagesInPDF($PDFPath = NULL)
{
$stream = fopen($PDFPath, "r");
$PDFContent = fread ($stream, filesize($PDFPath));
Use 'ALT+SHIFT+A' et voilá ...
Soooo nice:
SELECT * FROM `menu` WHERE weight != 0 ORDER BY (CASE type WHEN 118 THEN 2 WHEN 54 THEN 4 END) DESC
Useful to copy directories from one server to another:
cd into the dir you want to have your data
scp -prq username@127.0.0.1:/var/www/comefromdir/ .
For example: Change Collation in a big database dump.
cat dumpname | sed s/CHARSET=utf8/CHARSET=utf8\ COLLATE=utf8_unicode_ci/ > neuer_dumpname
mogrify -format jpg -resize "800x500>" *