Yet another reminder to myself how to use Gmail as SMTP-service.
Start with installing postfix. Just do the usual:
sudo aptitude install postfix
Select the following settings to start with during installation. Adjust according to your needs.
I've been working with Nginx lately and spotted the error Too many open files in the error log. To deal with this I raised the number of files that the Nginx user (www-data) is allowed to open. By default only 1024 files are allowed to be opened. This may be checked by running these commands as user www-data:
ulimit -Hn ulimit -Sn
The H and S refer to hard and soft values and the n switch to number of files. So to raise the limit a bit I added these lines in /etc/security/limits.conf:
I've been using NetBeans lately for a PHP project and the IDE has been quite good, until yesterday. For some reason NetBeans scanned the project continuously and I couldn't just kill the process from within the IDE, as it refused to shutdown. Upon a restart of NB the problem prevailed.
I solved the problem by removing two NetBeans directories. Start with shutting down NB, then run:
Sometimes I forget to terminate a SSH session properly from my laptop, just closing the lid and then away. One of the consequences are that active SSH sessions are terminated but they are not handing over the console. But there is a handy key combination that releases the console:
<ENTER>~.
That keycombo works on my Mac OSX 10.6.
For example to rename all files matching *.conf.bak so that just have the .conf-suffix:
for i in $(ls *.conf.bak); do mv -f $i ${i%.conf.bak}.conf; done;
My sons Vista installation was driving me nuts. I installed a game for him on the Vista machine, but an UAC dialog was popping everytime he wanted to run the game. Giving him administrator privileges wasn't an option. Neither was giving him my administrator password, nor turning off UAC completly. In fact UAC is quite good even if it is getting in your way sometimes. This is how I solved the problem.
Last time I downloaded the latest version of Eclipse, in this case Gallileo, I choose to download the version Eclipse for PHP developers. For my concern I mostly work with Python and PHP so by adding the PyDev extension I was up running quite soon. But the other day I needed to run an ANT script, that I use to generate documenation, and noticed that the Run as... context menu didn't show up ANT as an option.
Had this annoying message popping up when running a script on Ubuntu 8.0.4 LTS. The message read:
shift: N: can't shift that many
On Debian it works fine. The reason for this is the use of different shells in Debian and Ubuntu. Debian is using bash and Ubuntu is using dash. Check the symlink /bin/sh on the different distributions.
To reproduce save the following to a file named test_shift.sh:
This is just a reminder to myself after trying to do a factory reset of Android on a Samsung Galaxy.
The wrong way: trying to boot the phone in recovery mode and choosing to format data. After reboot all data were intact.
The solution was to power on the phone and go to Settings -> SD Card & Phone Settings -> Factory Data Reset. After that operation the phone was clean.
// John
Last week I've ordered the multi-talented music system NAS-Z200IR, as Sony nicely named it. It's just one flat panel with loud speakers and remote control with 3.5 inch LCD screen. You can plug your Ipod to the system, an USB-stick, play internet radio, ordinary FM/AM-radio. It is actually that ancient that it still can play CD:s, if you recall what they look like.