Category Archives: Uncategorized

roundcube dtc – main.inc.php was not found.Please read the INSTALL instructions

check permissions for main.inc.php In case of DTC hosting this file should be readable by group dtcgrp

Posted in Uncategorized | Leave a comment

Arduino: USBasp permission denied

Add file: /etc/udev/rules.d/99-USBasp.rules SUBSYSTEM==”usb”, ATTRS{idVendor}==”16c0″, ATTRS{idProduct}==”05dc”, GROUP=”uucp” Then add your user to the uucp group. And do # udevadm trigger

Posted in Uncategorized | Leave a comment

Owncloud client installation Debian 8

The owncloud client in Debian 8 is too old from the Debian repositories, use the opensuse repository. Add file: /etc/apt/sources.list.d/owncloud.list deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_8.0/ / Install the key wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Debian_8.0/Release.key apt-key add – < Release.key apt-get update http://software.opensuse.org/download/package?project=isv:ownCloud:community&package=owncloud

Posted in Uncategorized | Leave a comment

search and replace string recursively in directories

text1 -> text2 from current dirctory and sub-directories: find ./ -type f | xargs sed -i ‘s/text1/text2/g’  

Posted in Uncategorized | Leave a comment

Convert space to underscore in filenames

rename “s/ /_/g” *

Posted in Uncategorized | Leave a comment

reorder files by renaming

To rename files the way this can list them: ls -lv This is needed when for example you need to handle bunch of images named like: 1 front.jpg -> 0001.jpg 02.jpg-> 0002.jpg 3.jpg-> 0003.jpg 10.jpg-> 0004.jpg Found somewhere in the net, … Continue reading

Posted in Uncategorized | Leave a comment

Linux rename files to lower case *.JPG *.jpg

rename ‘s/\.JPG$/.jpg/’ *.JPG

Posted in Uncategorized | Leave a comment

Mp3 add silence beginning or end, Linux command line

To add silence at the beginning or at the end of an mp3 file, use “sox” with “pad”: sox original.mp3 new.mp3 pad 2.5 0 This adds 2.5s of blank space at the beginning of the mp3 file, 0s at the … Continue reading

Posted in Uncategorized | Leave a comment

headless remote browser screenshots

Source: http://jerel.co/blog/2010/10/using-firefox-on-a-headless-server-to-make-screenshots-of-websites apt-get install xvfb firefox imagemagick Xvfb :1 -screen 0 1280x960x24 & DISPLAY=:1 firefox http://www.alain.fi & DISPLAY=:1 import -window root -crop 622×948+68+71 -resize 600×400 -quality 90 /var/www/screenshots/screenshot.jpg

Posted in Uncategorized | Leave a comment

rename terminal

You can rename your terminal with this: echo -ne “\033]0;My terminal name\007”

Posted in Uncategorized | Leave a comment