Programming and more

Entries for May, 2011

Really detach screen after a disconnect linux

You work with screen. Then your connection is dropped. Then you reconnect, you type screen -r, then you see this: There is a screen on: 15425.pts-0.tvtorrents2 (Attached) There is no screen to be resumed.There is a screen on: 15425.pts-0.tvtorrents2 (Attached) There is no screen to be resumed. “Aaaa great” you say, I know that one! […]

gcj: Compile and run a program that needs a jar

gcj is a program that can compile java into native code. Extremely fast code, a lot less memory consumption. Read more about it here: http://www.r00t.gr/2011/05/java-compile-class-into-native-code/ I wanted to compile a program, that uses a mysql connector jar. mysql-connector-java-3.1.14-bin.jar. After 2 hours of googling I found the answer. I hope this helps someone else and save […]

Java: Compile class into native code

Ok I was researching for ways to make java run faster in Linux, and more importantly with less memory. So I though of researching on how to compile Java into native code (code that linux understand, not java code). I found some interesting things. The best was a free project, that implements java native compiling […]

MySQL: Automatically fix/repair/check all tables

I am using Cpanel on one of my servers. It’s a fucking mess, but I stuck with it from the old times where I didn’t know how to install and manage programs separately. I contact Cpanel Support constantly, because I see errors I don’t even understand what they mean, and the only reason I have […]

Thunderbird: Automatically Remove Old emails From a folder (v3.1.10)

Thunderbird is a mail client from Mozilla. It has every feature I ever wanted. I found some bugs, but this is probably because I have like 20 accounts and some thousand emails. I have some account that collects the Cron output from all the servers I monitor. These are usually programs running that collect information […]

mysql: Cpanel – Enable remote ROOT access/login for mysql

I got this one from Cpanel Support. I could login from a remote host with any other username, but not with root. So to remotely login with root to a cpanel/mysql box: Login where the mysql is as root, mysql -uroot -pmysql -uroot -p It will ask you for the root password just enter it, […]

How to export putty settings and import them to another computer

Putty is a very usefull ssh client for windows. I use it every single day. The only problem is, that it doesn’t have an export function. So you have to manually dig the registry export settings and import them later. Take a look at this if you are interested: http://downloadsquad.switched.com/2007/02/01/howto-transfer-your-putty-settings-between-computers/

How to get the size of a String in Python

Για να πάρετε το μέγεθος ενός String στην Python, πρέπει να καλέσετε την συνάρτηση len(). Παράδειγμα: string = ‘this is a string, ‘ print len(string)string = ‘this is a string, ‘ print len(string)

Fix Task Manager missing tabs

Windows is annoying. But unfortunatelly, I can work Linux pretty well with command line, but I am not used to their Desktop Enviroments yet. Also many programs that I use often don’t come out for linux (DreamWeaver) and other has very buggy versions for linux. So in home I have linux. One of the most […]

MySQL profiler, and other tricks.

MySQL profiler There is a mysql profiler in newer versions of mysql. But you have to enable it during installations. If you use Cpanel Or some other package, you don’t have control over this. So we will explore some other tricks you can do. The first one is Jet Profiler for MySQL. http://www.jetprofiler.com/. Not a […]