Once a geek, forever a geek…

January 17, 2012
by Marius Voila
0 comments

Difference between TCP and UDP

I wrote this article because I see a lot of sysadmins who don’t know there is a difference between TCP and UDP protocols.

Ex: Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)is a transportation protocol that is one of the core protocols of the Internet protocol suite. Both TCP and UDP work at transport layer TCP/IP model and both have very different usage.

TCP(Transmission Control Protocol). TCP is a connection-oriented protocol, a connection can be made from client to server, and from then on any data can be sent along that connection.
Reliable – when you send a message along a TCP socket, you know it will get there unless the connection fails completely. If it gets lost along the way, the server will re-request the lost part. This means complete integrity, things don’t get corrupted.
Ordered – if you send two messages along a connection, one after the other, you know the first message will get there first. You don’t have to worry about data arriving in the wrong order.
Heavyweight – when the low level parts of the TCP “stream” arrive in the wrong order, resend requests have to be sent, and all the out of sequence parts have to be put back together, so requires a bit of work to piece together.
Examples – World Wide Web (Apache/nginx TCP port 80), e-mail (SMTP TCP port 25 Postfix MTA), File Transfer Protocol (FTP port 21) and Secure Shell (OpenSSH port 22) etc.

UDP(User Datagram Protocol). A simpler message-based connectionless protocol. With UDP you send messages(packets) across the network in chunks.
Unreliable – When you send a message, you don’t know if it’ll get there, it could get lost on the way.
Not ordered – If you send two messages out, you don’t know what order they’ll arrive in.
Lightweight – No ordering of messages, no tracking connections, etc. It’s just fire and forget! This means it’s a lot quicker, and the network card / OS have to do very little work to translate the data back from the packets.
Examples – Domain Name System (DNS UDP port 53), streaming media applications such as IPTV or movies, Voice over IP (VoIP), Trivial File Transfer Protocol (TFTP) and online multiplayer games etc

January 11, 2012
by Marius Voila
0 comments

Recovering deleted files from the handlers

On compromised servers it is very common for the exploit to delete its self/logs to hide its presence.

Even though the executable may be removed from the filesystem as the process is forked from apache2 the parent process will still have file handlers open.

This will allow you to recover log files/executables as long as you do not kill the process.

To recover the files use the following steps:

  • Find the PID of the process with the open file handlers (use lsof)
  • cd /proc/ /fd where is what you found using lsof above
  • ls -lra and you should see a load of broken symlinks (red)
  • Copy the file using cp into another directory

December 30, 2011
by Marius Voila
0 comments

Track your Gmail address and fight spam

One of the biggest e-irritants I have is that my email address gets “sold” to companies to spam me with promotions by businesses I use (and they deny it). This trick should help identify those buggers.

The trick uses the ability tack on an alias to your gmail address using the ‘+’ character e.g my.username+alias@gmail.com (where ‘alias’ that you’ll track).

So, for example, if you sign up for a service or are supplying an email an address a bank or insurance company, you can use their name e.g when you enter an email address for a bank like Nordea Denmark (is my bank and they are “selling” my email address to everybody so they can spam me too) you can supply the address ‘my.username+nordea@gmail.com’.

You’ll still receive mail from them in your ‘my.username@gmail.com’ inbox. All you now need to do is create a filter and Label emails to ‘my.username+nordea@gmail.com’.

If you receive email or get companies that reference email to ‘my.username+nordea@gmail.com’ you know who they got your email address from.

Fight the spam!

December 30, 2011
by Marius Voila
0 comments

To those who say Google+ is dead, dying or a failure

Please try this:

1. Go to Twitter.com from a fresh browser, ie, not logged in.

2. Sign up for a new account, name it anything you like.

3. Without following anyone, sit and view your stream for a little while. An hour or two should do.

4. Return in a month, view your stream. Does it still look like it did a month ago?

5. Write an article on how no one uses Twitter, it’s a ghost town and a complete failure.

Let me know how that works out for you.

December 16, 2011
by Marius Voila
2 Comments

Deep Purple epic concert

I’m walking back to my place from the Deep Purple concert and I’m a bit disappointed because of the Ian Gillan’s voice, I mean I know he is old and all but what the heck when you see you can’t keep up with your own band then quit. The biggest surprise for me was when I entered in the concert hall and I saw the hall full with chairs…I understand the fact that danish people are lazy but c’mon Deep Purple are known as the loudest band in the history and for god sake is a ROCK CONCERT you don’t go to listen the band who practicaly invented modern hard rock music and show by sitting silently on the chairs like children’s in the school. Was a one and a half hour concert and in all this time I had to stay on my chair(that made me go crazy but when in Rome, do as the Romans do) at one point my butt felt asleep so I hope that this long walk will wake it up :) )

But long story short the band was awesome and the guitar and drums solos was amazing…and the Neue Philharmonie Frankfurt was more then I expected. Overall the concert was EPIC even with those minor glitches and I have to say takket være en masse to Jeppe Vind from KulisseLageret for giving me tickets and for having the chance of listening Deep Purple Live for the first time in my life and I hope not the last time :D .

Click to see the chairs(sorry for the bad quality but is a HTC Sensation XS camera(witch is really shitty)) :)

After reading this article I hope no danish person will feel offended or something but you know is the truth..I mean for god sake again: is a ROCK CONCERT not a opera concert…you do it wrong :)

December 14, 2011
by Marius Voila
0 comments

New life update

I’m currently listening to all of my Deep Purple music right now (not just the Christmas stuff) while writing up the new website for some clients of mine and a API. I mentioned about Deep Purple because they are coming tomorrow at Casa Arena in Horsens Denmark and I’m GOING :D . Yeah I enjoy the life in Horsens. I finally had the chance to meet Mud Morganfield and talk with him and I got a signed vinyl album of The Goo Men and all of this was only possible because of the good friends from KulisseLageret so all I wanna say is a big THANK YOU guys.

And some pictures just to show off :)

Me and Mud Morganfield

The Goo Men signed album and Mud’s signature on a piece of paper

The Goo Men signed album and Mud's signature on a piece of paper

And the tickets for the Deep Purple concert

December 4, 2011
by Marius Voila
0 comments

Zombie Code


If there’s anything I hate more than dead code, it’s zombie code. Dead code is code that’s remained in the system even though it’s no longer really used.
It might be small, like unused imports, instance variables and methods. It can be whole classes that make up entire features no longer used.
The biggest PITA is when you’re not really aware of the fact the code’s dead and unused, sitting there and occupying precious bits, and stumble across it as part of a task, trying to understand how it influences what you want to do next.
Whenever I recognized something that looks like dead code but I’m not entirely sure, I find it pretty easy to delete it quickly, once I take a look in the version control logs and see when it became no longer in use and why.
Zombie code is code that was never alive, and so couldn’t really become dead. It’s the undead code – code that died right when it was committed. Code that never ran or never worked. The are two reasons I hate zombie code more than “plain” dead code.

The first reason is that it simply wastes more of my time. Looking back in version control won’t help me see the commit in which the code was “decommissioned”, it would just appear to always sit there. That means I have to take extra care to verify that it, in fact, never worked.
The second reason is that it’s plainly someone saying he doesn’t give a damn. I mean, let’s put aside TDD. Heck, let’s put aside unit testing at all. It means the code never even ran the damn thing and saw in his own eyes it did what he claims it did.
Be kind to your teammates. If you’re not a good enough coder to test it, at least see that it runs once in your own eyes.

November 27, 2011
by Marius Voila
0 comments

Eclipse Meets Vim And Emacs

Here’s a great tool named Eclim which brings Eclipse to vim and there’s an emacs port as well. I’ve tested for both vim and emacs and I think vim version is better than the emacs version. Emacs version needs work. I’m jealous.

Emacs Setup:

  • Follow these instructions to install eclim.
  • Download emacs plugin from here.
  • Move downloaded emacs plugin to your .emacs.d/
  • Write the following to your .emacs;
    (add-to-list 'load-path (expand-file-name "~/.emacs.d/eclim/vendor"))
            (require 'eclim)
     
            (setq eclim-auto-save t)
            (global-eclim-mode)

Whenever you need to do Java development, first open a console and run the eclimd and then open emacs.

October 31, 2011
by Marius Voila
0 comments

My one week without “Social Media”

It may be hard to imagine in today’s world, but there was once a time when computers didn’t exist, cell phones didn’t exist. If you go back far enough, there was even a time the written word didn’t exist.

We should feel privileged to live in an era of such advancements. It’s easier than ever to stay connected with people and develop relationships all over the world.

But this era of Facebook, Twitter, Google Plus (each not even a decade old) can be dangerous too. Stepping back to a simpler world now and then can prove beneficial. It’s also extremely difficult.

Breaking An Addiction

Cell phones have been likened to cigarettes, and one study found that the average person checks their phone 34 times a day. Internet usage itself is increasingly becoming an addiction.

It’s especially tough to step away from all of these gadgets and opportunities for connectivity when you work in the online business like I do. Industries today have been transformed by 24/7 Twitter feeds, touched by the ubiquity of Facebook and impacted by new tools like Google+. If you don’t keep up, you’ll be left behind by the intense competition out there.

The addiction is very real for me. Many told me I could never do it. I decided to try this anyway: One week without posting anything on Facebook, Twitter or Google+.

A Good Feeling

Seven days after I began my challenge, I’m proud to say I succeeded: not a single update to Twitter, Facebook or Google+. Therefore, it is possible to step away, survive and even thrive. It’s not necessarily lazy either — it’s opening up your eyes to brand new experiences (reading, observing and immersing myself in the culture and history of Horsens, the people around me and nature, I learned dozens of new things every day).

So, as painful as it was at first, it was refreshing, relaxing and I truly do feel recharged. The proof is there in my streams, and no one can take it away from me: nothing posted on my Twitter, Facebook and Google+ pages between Oct. 24 and Oct. 31(and I’m thinking to take even a longer “vacation” from Facebook).

Maybe that duration scares the daylights out of you, but I highly recommend you try this too. Even for just a weekend. You’ll thank me later. Hej! And tak for reading.