Πέμπτη 31 Ιουλίου 2008

How foxmarks saved me...

I use firefox a lot. I have it installed at all the computers I use.
My main PC at home, my secondary pc at home, my laptop, my asus eee, my work's PC, all of them have firefox.
Moreover I use several operating systems at these PC's. So I use 7 different firefox installations.

I always had trouble keeping my bookmarks organized. My first solution was to build a simple php script that using a mysql database was able to save my favorite bookmarks. But it was a little trouble. Whenever I wanted to add a bookmark I had to visit the php script, enter the password, write down the url, click the "Submit" button and get a "Bookmark was added" confirmation message.

It was actually a very good idea. I also added a nice wysiwyg editor, a comment system and start using it in different ways.

So I concluded with a note/blog/bookmark/todo/remember system. It was fast, simple and I had access from anywhere.

That worked just fine until I found foxmarks. Foxmarks is a plugin for firefox that synchronizes the bookmarks. Also it has a useful web interface to check your bookmarks online without downloading the plugin.

Now I do not care at what pc I'm working on, I know that my bookmarks will be there synchronized.

Thank you foxmarks!

http://www.foxmarks.com/

Τετάρτη 30 Ιουλίου 2008

dsniff package: Various tools to sniff network traffic

Let me introduce you one of my favorite networking tools: dsniff

dsniff:
Various tools to sniff network traffic for cleartext insecurities
This package contains several tools to listen to and create network traffic:

* arpspoof - Send out unrequested (and possibly forged) arp replies.
* dnsspoof - forge replies to arbitrary DNS address / pointer queries on the Local Area Network.
* dsniff - password sniffer for several protocols.
* filesnarf - saves selected files sniffed from NFS traffic.
* macof - flood the local network with random MAC addresses.
* mailsnarf - sniffs mail on the LAN and stores it in mbox format.
* msgsnarf - record selected messages from different Instant Messengers.
* sshmitm - SSH monkey-in-the-middle. proxies and sniffs SSH traffic.
* sshow - SSH traffic analyser.
* tcpkill - kills specified in-progress TCP connections.
* tcpnice - slow down specified TCP connections via "active" traffic shaping.
* urlsnarf - output selected URLs sniffed from HTTP traffic in CLF.
* webmitm - HTTP / HTTPS monkey-in-the-middle. transparently proxies.
* webspy - sends URLs sniffed from a client to your local browser

Τρίτη 29 Ιουλίου 2008

Cool transparent xfce4-terminal without borders

alltray "xfce4-terminal --geometry=123x26+240+160 --hide-menubar --hide-borders --hide-toolbars"

Δευτέρα 28 Ιουλίου 2008

Linux mass photo resize

Resizing photos in Linux it's just a simple command.

First you have to have the Imagemagick package installed.

Then create a copy of the folder of the photos you want to resize.

Go to that directory and enter:

mogrify -resize 640x480 *.*



REMEMBER that the photos will be resized so if you want to keep the original photos you HAVE to keep a backup of your photos first.

Πέμπτη 24 Ιουλίου 2008

Check PHP script's execution time

An easy way to see how long it takes PHP to run a script:

1) Put this at the top of the page inside the php brackets


$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;



2) Put other code and html


3) Put this code at the bottom of the page


$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
echo "This page was created in ".$totaltime." seconds";




http://www.developerfusion.co.uk/show/2058/

Δευτέρα 21 Ιουλίου 2008

Lazy Linux: 10 essential tricks for admins from IBM

Lazy Linux: 10 essential tricks for admins from IBM

http://www.ibm.com/developerworks/linux/library/l-10sysadtips/index.html?ca=drs-

Very very nice...

Check this out too: http://www.ibm.com/developerworks/views/linux/libraryview.jsp?topic_by=All+topics+and+related+products&sort_order=desc&lcl_sort_order=desc&search_by=&search_flag=&type_by=Tutorials&show_abstract=true&sort_by=Date&end_no=100&show_all=false&S_TACT=105AGX03&S_CMP=ART

Τετάρτη 16 Ιουλίου 2008

Linux without sound??? NO WAY!

So you installed linux but you are not able of listening your favorite artists?

DO:

sudo aptitude install alsa-base alsa-utils alsamixergui linux-sound-base



After you install them try:

sudo alsaconf



This will search for a playback device and install it automatically.

Run alsamixergui and make sure nothing is muted, your speakers are on, connected to your pc, volumed up and working (!)

Install your favorite player (mplayer, vlc, xmms) or my favorite player (amarok) and enjoy!

PHP and RSS

PHP and RSS

Μια μαγική βιβλιοθήκη που απλά τα έκανε όλα πολύ εύκολα (και γρήγορα!)

http://magpierss.sourceforge.net

Τρίτη 15 Ιουλίου 2008

My desktop's screenshot

It's Debian 2.6 with XFCE I use @ work. Really beautiful.


Just love the beauty of simplicity.

Here's a link to ten other nice desktops: http://liakoni.gr/node/48

And a second try:

Δευτέρα 14 Ιουλίου 2008

How to change mac address

Changing mac address in one interface at linux is extremely simple.

All you have to do is:

ifconfig ath0 hw ether ne::w::mac::addr::e::ss::


Using this method will change your mac address temporary only, until the next reboot.

Alternatively you can install the macchanger package which has the following features:

* set specific MAC address of a network interface
* set the MAC randomly
* set a MAC of another vendor
* set another MAC of the same vendor
* set a MAC of the same kind (eg: wireless card)
* display a vendor MAC list (today, 6200 items) to choose from

It also has a nice gui: macchanger-gtk

Κυριακή 13 Ιουλίου 2008

Change volume with command

Change volume with command

amixer -q set PCM 2- unmute

amixer -q set PCM 2+ unmute



also try: alsamixer and alsamixergui

Τρίτη 8 Ιουλίου 2008

chm to pdf

Δεν με βόλευε ποτέ να διαβάζω σε chm. Για αυτό έψαξα και βρήκα ένα utility γραμμένο σε python απο την google που μετατρέπει τα chm σε pdf.

http://code.google.com/p/chm2pdf/

http://chm2pdf.googlecode.com/files/chm2pdf-0.9.tar.gz

Tray all apps with alltray!

Το alltray είναι μια καταπληκτική εφαρμογή που αναλαμβάνει να "τοποθετήσει" στο system tray όλες τις εφαρμογές! Δουλεύει με το minimize και με το close και θα σας φανεί χρήσιμο σε περιπτώσεις όπως του evolution, του thunderbird αλλά και πολλών άλλων προγραμμάτων.

Συντάσσεται ως εξής:

alltray applicationname

πχ: alltray evolution



Προσοχή, δεν υποστηρίζεται απο το beryl!

Τετάρτη 2 Ιουλίου 2008

Making symbolic links

Εαν υπάρχει κάτι που δεν θα αντάλλαζα με τίποτα στο linux είναι η δημιουργία symbolic links.
Θα αποφύγω να περιγράψω θεωρητικά τι είναι, θα δώσω ένα πρακτικό παράδειγμα.

Έχω δυο δίσκους που είναι mounted στις εξής τοποθεσίες:
/media/disk1 και /media/disk2

Θέλω τα περιεχόμενα τους να μπορώ να τα επεξεργάζομαι χωρίς να χρειάζεται να φεύγω κάθε φορά απο το home μου, καθώς (για λόγους ασφαλείας) όταν συνδέομαι με ftp να μην χρειάζεται να πάω πιο πάνω απο το home.

Έτσι δημιούργησα 2 symbolic links ώς εξής:

ln -s /media/disk1 /home/ventrix/200GB
ln -s /media/disk2 /home/ventrix/500GB



Τώρα έχω δυο φακέλους μέσα στο home μου που οδηγούν απευθείας στους δίσκους!

Μια άλλη χρήση του ln που χαίρομαι ιδιαίτερα είναι το /var/www/myownsite1 να δείχνει στο /home/ventrix/myownsite1 ώστε να γλιτώσω αρκετή πληκτρολόγηση όταν θέλω να κάνω αλλαγές.

Ajax loading image

Φανταστικό site για την δημιουργία loading gifs!

http://www.ajaxload.info/

[ΑΣΧΕΤΟ]

UML design in linux

Η UML (http://en.wikipedia.org/wiki/Unified_Modeling_Language) είναι μια πολύ ωραία, καταπληκτική, σχεδόν φανταστική, σχεδιαστική-περιγραφική αντικειμενοστραφής γλώσσα (σκέτο) που δημιουργήθηκε για να γεφυρώσει το χάσμα μεταξύ των προγραμματιστών και όλων των υπόλοιπων (άσχετων).

Επίσης δημιουργήθηκε για να σπάει τα νεύρα των προγραμματιστών όταν αυτοί πρέπει να σχεδιάζουν αυτό που θέλουν να φτιάξουν σε UML, για να φαίνεται πιο "ολοκληρωμένο".

[Την επίσημη δικαιολογία της δημιουργίας της θα την βρείτε στο 1ο link]

Μιας και έμαθα UML στην σχολή, όσο άχρηστη και αν μου φάνηκε (δεδομένου οτι σαν γνήσιος προγραμματιστής, ΠΟΤΕ δεν σχεδιάζω απο πριν αυτό που θα φτιάξω) αλλά και όσο χρήσιμη (θα την συνιστούσα σε περιπτώσεις που θέλετε να εντυπωσιάσετε ή για reverse engineering) είπα να εκμεταλλευτώ την ευκαιρία (του εντυπωσιασμού πάντα) και να σχεδιάσω την πτυχιακή μου πρώτα σε UML.

Εδώ συνάντησα και το πρώτο μου πρόβλημα.
Για να "σχεδιάσω" σε UML χρησιμοποιούσα το πρόγραμμα της visual-paradigm που είναι υπερπλήρες και κάνει τα πάντα και το Visio με τα καταπληκτικά γραφικά (που δεν υποστηρίζει όλες τις δυνατότητες βέβαια). Κανένα απο τα δυο δεν είναι δωρεάν και κανένα απο τα δύο (μα τι έκπληξη) δεν έχει κάποιο port σε linux.

Θέλω να αποφύγω την χρήση του Wine ή του VirtualBox για καθαρά ιδεολογικούς λόγους.

Με μια πρόχειρη αναζήτηση βρήκα το DIA και το Umbrello.
Στο http://www.linuxjournal.com/article/8334 συγκρίνει τα DIA, Poseidon και MagicDraw, όμως τα δυο τελευταία δεν υπάρχουν σαν πακέτα στο Debian. Για καθαρά ιδεολογικούς λόγους και πάλι δεν θα τα εγκαταστήσω.

Πάμε να δούμε τι γίνεται με τα άλλα δύο...