Author: karlo
-
Encrypt Dropbox content easily on Linux/BSD/OSX using encfs
Install encfs do $mkdir ~/Dropbox/Secure ; mkdir ~/DropboxSecure do $ encfs ~/Dropbox/Secure ~/DropboxSecure I chose paranoia mode. This will use the settings below. Enter a secure password and there you go. You now have a folder ‘DropboxSecure’, in which you can store your sensitive data. It will save this in ~/Dropbox/Secure/ . You can unmount…
-
Sleep better by installing one simple program
Redshift adjusts the color temperature according to the position of the sun. A different color temperature is set during night and daytime. During twilight and early morning, the color temperature transitions smoothly from night to daytime temperature to allow your eyes to slowly adapt. At night the color temperature should be set to match the…
-
Easily setting up a ThePirateBay.org mirror (wordpress plugin)
Easier than my previous post, use this plugin for wordpress.
-
Easily setting up a ThePirateBay.org mirror (nph-tpb.cgi)
If you want to set up a simple pirate-bay mirror, download this script. This is the nph-tpb.cgi – file various sites talk about. Setting up is easy. It is just a CGI script. So place it in your CHI-folder (or create one) and set the directory-settings so it will allow CGI scripts. Sample config is in…
-
Example postfix + dovecot SSL configuration
I generated SSL certs using this guide. Then I set up dovecot and postfix. View my dovecot conf here and my psotfix main.cf here. You can use this to configure your own working SSL mail. Remember to install: dovecot, dovecot-imap and postfix. On your devices, use ports 143/993 (incomping) and 587 (outgoing). Please note my…
-
[Solution] Can’t use /usr/lib/dovecot/imap: No such file or directory
Getting this? $ sudo service dovecot restart * Restarting IMAP/POP3 mail server dovecot Error: mail_executable: Can’t use /usr/lib/dovecot/imap: No such file or directory Fatal: Invalid configuration in /etc/dovecot/dovecot.conf …fail! install dovecot-imap ;)
-
Update wordpress without needing FTP
Give your wordpress dir the right permissions: sudo chmod -R 775 wp-dir ; sudo chown -R username:www-data Add this in wp-config.php: define(‘FS_METHOD’,’direct’); You can now update via ‘update now’.
-
Test SMTP block (sshguard, fail2ban)
I used the following script to test brute-force protection: #!/usr/bin/php <?php for( $i=0; $i<99; $i++ ){ echo “Will try [$i] now. \n”; $mbox = imap_open(“{mail.mailserver.com:143/imap/novalidate-cert}INBOX”,”user_test_$i”,”foobar”,0,0); } ?> Edit: You will need php-cli and php-imap
-
Deprecated Linux networking commands and their replacements
Found this gem on an other blog: Deprecated Linux networking commands and their replacements I mostly use $ifconfig. Let’s try `$ ip a` from now on :).
-
[Solution] GConf Error – GetDefaultDatabase – org.gnome.GConf.Server
Recently I got the error: GConf Error: Configuration server couldn’t be contacted: D-BUS error: Method ” GetDefaultDatabase” with signature “” on interface “org.gnome.GConf.Server” doesn’t exist. I got this while trying to start Evolution (mail software). Solution is simply rebooting. I forgot to reboot after my Fedora 15 to Fedora 16 upgrade
-
[Solution] Jar not working via command line
Getting this: $ java drs.jar Exception in thread “main” java.lang.NoClassDefFoundError: drs/jar Caused by: java.lang.ClassNotFoundException: drs.jar at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: drs.jar. Program will exit. Solution is: $java -jar drs.jar
-
Clear BASH history
Clear the BASH history easily via: $ >~/.bash_history Remember to log out after doing this.
-
ifconfig gone (command not found)
Today, ifconfig was not working for me. I think this happened after I installed X11 on my headless server. $ ifconfig bash: ifconfig: command not found It turns out something removed /sbin from my $PATH. Read more about the $PATH here. The ifconfig-command resides in /sbin: $ whereis ifconfig ifconfig: /sbin/ifconfig The solution is to…
-
Use $top over SSH
If you want to use `top` over SSH, use the -t option: $ ssh -t servername top This also works if you want to use `tail -f` over ssh: $ ssh -t servername “tail -f”
-
My idea for this site
My idea on this site is to put snippets of codes / solutions / things I discovered here. When people will google a sulution to their problem, I hope they find it here. Or, if I search for the same problem again, I’ll find the answer here.