Featured Post

read more

They say that time changes things, but you actually have to change them yourself.

Since my last post, a lot has changed. For example, my classes. I have been doing EMS for a couple weeks but found out that this would be to fast and too difficult for me right now. I just wasn’t ready for it. So I managed to drop this class on the last day we were allowed to do so. Instead I’m taking Welding now. When I was in Colorado around 2007/2008 I took Welding in High School and those credits were transferred to the college which I am attending right now. So it would be a shame if I wouldn’t go any further with it. I am taking Advanced Composition, Advanced Reading and Welding now. So that should keep me busy. And this is the last time I changed this semester.. cause I can’t change it now anymore. haha.

Besides school, I’m still waiting for my social security number so I can get my permit and/or license. I can’t wait until I get this, because, living this far from town and having no license and/or car, makes it kind of hard to do stuff. Like going to school, or hanging out with friends. I’m skipping the hanging out with friends right now, because I don’t like to ask for rides. For the “going to school part” we found a solution. In the morning when some of the people I live with go down to work. I ride along, and then when we get there I take the bus up to my college. Most likely this gives me a lot of time at the college, which is kind of nice. Because then I can either make my home work or just do some research in the library. Only it sucks when I’ve done all of my home work already. So yeah.. but you know how it goes. Life goes on!

First day of College

Today, was the day.. My first day of a new beginning. College, a new start of a life. A start of a process to a career. It was actually a pretty good day, even though I had to be present at the college around 8 AM. Because that was the time when my first class started. So my french buddy Tim took me up there and dropped me off before he went to work.

They scheduled me for Advanced Composition, Grammar and Reading. After I took these classes today, I still felt like there was something wrong. I was in a class full with foreigners. Which is cool, but I didn’t expect. Who had either a little or NO English basic skills at all. Plus I did not want to be in three English classes at the same time. So I went down to one of the people who could help me and talked to them about this. We figured out I could drop Grammar, so I can take an EMS Class. Which is great! So now I need to contact this lady from the Emergency Medical Services to get into a class.. ASAP!

So after classes I tried to go see this lady, but she seemed like not to be on campus today. So I need to contact her through either mail or by phone. — So to be continued about that subject!

After I tried all this, I just relaxed and hung out..Thank god I brought my iPod Touch! .. waiting for Tim to call me, he would pick me up after work he said. He’s such a nice frenchy.

A new beginning.

So we are almost starting a new year together. Couple days ago I moved back to Colorado to attend college. I will be starting January 20th. My flight from Amsterdam to the United States didn’t start very good. Before I even left Amsterdam I had already a 4 hour delay. Then finally when we got to Chicago I figured out that my flight was canceled to Colorado Springs. So I had to stay the night in Chicago. United Airlines gave me a hotel room though, in the Hilton Hotel. So that was nice. They also gave me a dinner voucher. So I could eat where ever I wanted to and spend 15 dollars.

So I left my luggage out there with the lady, and she said that it would get on the first flight the next morning. Which I were supposed to be on too. After I slept for a couple hours in the hotel, I went back to the lady’s desk and asked if my luggage was still good.. She checked and everything was alright, it was scheduled for the same flight I was on. I felt pretty good about it. So I got on the airplane. Oh did I mention I got a First Class seat? That was kind of nice. So after about 2,5 hours or so I finally arrived in Colorado Springs.. And guess what.. No luggage. So I had to claim it, I had to fill out some paper work and wait for Tim and Zach to pick me up. It was a long day. But I can’t really complain I guess, cause then later I heard there was happened some crazy stuff in other airplains like you can read HERE. I could have been on that one.. You never know.

But I’m here, and safe. So thats good. Now I pretty much have some time to get back on my feet. I have been looking for furniture for about 5 days now. It’s harder then I thought. Also I really need a laptop, because now I’m using Tim’s computer all the time.. thats not really a problem though. But it’s easier for myself to have a laptop again. So I can install my email client and all that.

Yesterday I went to visit my old host family, it was nice to see them again. We had fun. And I brought some presents. So everybody happy. haha.

So this is all what’s on my mind right now, when I have some new stuff I’ll post it! Thanks for reading!

Convert .flv to .wmv using bash.

Package needed: ffmpeg

root@server:$ yum install ffmpeg

Using the command shown underneath you can convert the movie extension .flv to .wmv real easily.

user@server:$ ffmpeg -i movie.flv -vcodec wmv1 -acodec adpcm_ima_wav movie.wmv

How to get yum package update notifications via e-mail?

This will work for: Red Hat / CentOS / Fedora
For Debian / Ubuntu: Please visit this website.

My server sends me a notifications for everything what happens on the server through e-mail, the only thing I had to check manually every time were the updates / upgrades for my Linux system. I figured there should be a way to get yum-update send notifications with available upgrades. So what we are going to do now is force yum to send an email when a update or upgrade is available.

First thing we need to do is open the yum config file.

root@server:$ nano /etc/yum/yum-updatesd.conf
[main]
# how often to check for new updates (in seconds)
run_interval = 3600
# how often to allow checking on request (in seconds)
updaterefresh = 600

# how to send notifications (valid: dbus, email, syslog)
emit_via = dbus
# should we listen via dbus to give out update information/check for
# new updates
dbus_listener = yes

# automatically install updates
do_update = no
# automatically download updates
do_download = no
# automatically download deps of updates
do_download_deps = no

Add these variables, and change “email_to” to your e-mail address:

emit_via = email
# who to send the email to:
email_to = email@example.com
# who send the notifications
email_from = yum-update@yourserver.com

Here is my working config file. You can also just copy and use this one and change the e-mail addresses.

[main]
# how often to check for new updates (in seconds)
run_interval = 3600
# how often to allow checking on request (in seconds)
updaterefresh = 600

# how to send notifications (valid: dbus, email, syslog)
emit_via = email
# who to send the email to:
email_to = email@example.com
# who send the notifications
email_from = yum-update@yourserver.com

# should we listen via dbus to give out update information/check for
# new updates
dbus_listener = yes

# automatically install updates
do_update = no
# automatically download updates
do_download = no
# automatically download deps of updates
do_download_deps = no

After saving the file. Restart notification yum-updatesd service.

root@server:$ /etc/init.d/yum-updatesd restart

E-mail notification sample sent by yum notification.

Five ways to backup your Linux Computer or Server using bash.

Using “DD”

Make a backup of a local hard disk on remote host via ssh.

user@server:$ dd bs=1M if=/dev/hda | gzip | ssh user@ip_addr 'dd of=hda.gz'

Backup content of the hard drive to a file.

user@server:$ dd if=/dev/sda of=/tmp/file1

Make a copy of MBR (Master Boot Record) to floppy.

user@server:$ dd if=/dev/hda of=/dev/fd0 bs=512 count=1

Restore MBR from backup copy saved to floppy.

user@server:$ dd if=/dev/fd0 of=/dev/hda bs=512 count=1

Using “Dump”

Make a full backup of directory ‘/home’.

user@server:$ dump -0aj -f /tmp/home0.bak /home

Make a incremental backup of directory ‘/home’

user@server:$ dump -1aj -f /tmp/home0.bak /home

Restoring a backup interactively.

user@server:$ restore -if /tmp/home0.bak

Using “Rsync”

Synchronization between directories.

user@server:$ rsync -rogpav --delete /home /tmp

Rsync via SSH tunnel.

user@server:$ rsync -rogpav -e ssh --delete /home ip_address:/tmp

Synchronize a local directory with a remote directory via ssh and compression.

user@server:$ rsync -az -e ssh --delete ip_addr:/home/public /home/local

Synchronize a remote directory with a local directory via ssh and compression.

user@server:$ rsync -az -e ssh --delete /home/local ip_addr:/home/public

Using “tar”

Make a incremental backup of directory ‘/home/user’

user@server:$ tar -Puf backup.tar /home/user

For more or better ways to backup your system using tar look here.

Using “SSH”

Copy content of a directory on remote directory via ssh.

user@server:$ ( cd /tmp/local/ && tar c . ) | ssh -C user@ip_addr 'cd /home/share/ && tar x -p'

Copy a local directory on remote directory via ssh.

user@server:$ ( tar c /home ) | ssh -C user@ip_addr 'cd /home/backup-home && tar x -p'

Local copy preserving permits and links from a directory to another.

user@server:$ tar cf - . | (cd /tmp/backup ; tar xf - )

Eight interesting Linux/Unix commands.

This command shows you information about who is logged in.

user@server:$ w

This gathers information about a domain name.

user@server:$ dig domain.com

Query DNS servers for information about domain names

user@server:$ nslookup domain.com

Ancient command to find out more information about DNS

user@server:$ whois domain.com

Find the disk usage of a file or a directory.
(-sh = better readable | -ch = the same but larger output)

user@server:$ du *
user@server:$ du -sh *
user@server:$ du -ch *

Disk freespace, pretty much self explaining but I use it with the -h switch to convert the bytes to megabytes or gigabytes

user@server:$ df
user@server:$ df -h

Find information about users.

user@server:$ finger username

Show who is logged on, and print: time of last system boot, dead processes, system login processes, active processes spawned by init, current runlevel, last system clock change.

user@server:$ who -a

How to add overlay .png image to video as logo using bash?

Using this command you can create/convert a video with your own chosen logo. Have fun.

user@server:$ ffmpeg -i movie.mpg -vhook '/usr/lib/vhook/watermark.so -f overlay.png -m 1 -t 222222' -an mm.flv