Kill only Tomcat

Posted by Ktoso under coding, java (No Respond)

There is sometimes the need to kill some JVM, I usually use “killall java” and that works fine as long as that’s in fact what I want – kill ALL. But let’s say i just want to kill Tomcat and not my IDE? The below method works quite well in such an situation:

[ktoso@homunculus ~]$ sudo [...]

Tags: , , , , , ,

MySQLIntegra: dbfiller & wiki

Posted by Ktoso under coding, null (No Respond)

I passed all my exams at my first attempt and should have now some time to relax, right? Well something like that, I’m actually doing quite a lot these days. We’re on the roll with MySQL Integra.
Our server “Kopiec” is somewhat online (running CentOS off course) – we’re able to start/stop if thanks to a [...]

Tags: , , , , , , , , , , , , , ,

Aiming Higher…

Posted by Ktoso under coding (No Respond)

…is exactly what I’m currently trying to do. Thus, I’m out of Mediaframe, and got involved in a fascinating and very cool project. Under the lead of Dr Marek Długosz me and 2 of my friends will be tackling the topic of “MySQL Data Storage Engine Comprehension – with focus on Automatics use cases”. It’s [...]

Tags: , , , , , , , , ,

(Almost) Automatically convert files into PDF

Posted by Ktoso under coding, freedom, fun, terminal heroes (No Respond)

I’m learning Numerical Analysis right now and a friend of mine found some really nice PS files by dr Marian Bubek ( http://www.icsr.agh.edu.pl/~mownit/mownit.html ). I was really happy to see some *.ps but some people from my fellow students started complaining that they’d rather have pdf’s and not ghostscript files (who knows why they’d do..?). [...]

Tags: , , , , , , , , , , , , , ,

AWK and multiple lines from shell command

Posted by Ktoso under coding (No Respond)

Let’s say you want to read the ps output inside an AWK script, it’s not so simple since system returns an exit code and not the string you want – it’s being sent to stdout, here is a simple trick to read multiple lines from a shell command inside awk:
awk ‘BEGIN{while (“ps aux” | getline){ [...]

Tags: , , , , , , , ,

Fixing Blender problems on IntelGMAX4500

Posted by Ktoso under coding, freedom, guide (No Respond)

I’ve recently bought a new laptop, a 15.6” HP Probook, that replaced my netbook Asus EEE 900 (needed some bigger hardware to work on “on the move”). One problem I encountered was blender not displaying correctly if I’d expand any dropdown menu etc. The fix is very simple yet powerfull, just set the following:
LIBGL_ALWAYS_SOFTWARE=1 blender
This [...]

Tags: , , , , ,

I’m an RHCT – yay!

Posted by Ktoso under Project13 (1 Respond)

Yes, my GNU/Linux skills have been certified and now I can call myself a Red Hat Certified Technician as I’ve today passed the RH-202 exam with a 100% score – which leads me to the idea that I should have tried to tackle RHCE and not RHCT – I’ll do ir eventually someday I guess [...]

Tags: , , , , ,

Vim Hacking – 1 – vis

Posted by Ktoso under coding, terminal heroes (No Respond)

Vim is a really amazing text editor (though I’d like to learn Emacs too soon… :-)) and it can be easily expanded to be even more useful. One super cool extension I found is: vis – it allows powerful sed-like line modification (you could use sed from inside vim, but that’s not really “handy”). Vis [...]

Tags: , , , , , , ,

Terminal Heroes – 6 – Track X events

Posted by Ktoso under coding, fun, terminal heroes (No Respond)

Another Command Line Fu oneliner I’ve sumbited today:

#show X window events in chosen window

$ xev -id `xwininfo | grep 'Window id' | awk '{print $4}'`

EnterNotify event, serial 13, synthetic NO, window 0×6400053,

    root 0×13c, subw 0×640005b, time 42431610, (367,0), root:(369,63),

    mode NotifyNormal, detail NotifyVirtual, same_screen YES,

    focus NO, state 16

 

MotionNotify event, serial [...]

Tags: , , , , , , , , ,

Terminal Heroes – 5 – List internet active apps

Posted by Ktoso under coding, fun, terminal heroes (No Respond)

A simple yet usefull command-line-fu I made up:

#list all internet active apps

$ netstat -lantp | grep -i establ | awk -F/ '{print $2}' | sort | uniq

 

firefox

java

pidgin

thunderbird-b

Lookup this command at CommandLineFu
Thanks to HarimaKenji for fixing a little issue with this command.
—update—
CommandLineFu user submited a super short version for this:lsof -P -i -nComandLineFu ownz!

Tags: , , , , , , ,