through countless years, a lazy life series

Wednesday, August 24, 2011

Living in the terminal.

It's been a while since I made a post. I haven't had the mood for writing lately. Today it's gonna be a technical post, a new work environment I've set for my self on my machine and I wanted to share with you guys. I will try to make this short.
Recently I was introduced by Waleed Tuffaha to tmux. A screen like terminal multiplexer that provides some nice feature which are not there in screen. This is not gonna be my main topic of this post but I encourage you guys to try it out . This link show why it's better than screen and some basic configurations that you might need as a starter.
tmux has been my main program to use on Ubuntu recently. I am using it to write my codes, write my TEX documents, do my chats and quick Google searches (:. In this post I will tackle the chat part. I believe the more you have in your CLI the faster you can manage your work and spare time activities (such as chat).
My main chat protocols are IRC, MSN and Skype. In this post I will talk about IRC and MSN in terminal and leave Skype for another post. Maybe.
The following figure shows a preview of the work environment in tmux where I have a normal terminal pane and a pane with vim editing a TEX file.

IRC:
I won't go into much details as the tool is available in the repositories. All u have to do is install weechat using one of the following:
  • $sudo apt-get install weechat
  • #apt-get install weechat
Jk , You shouldn't be in the second case often (:
Once weechat is installed, you can run it by typing "$weechat-curses" in your terminal. The figure below shows weechat running on my machine. Once there you need two commands to reach our #geex channel which are:
  1. /connect freenode
  2. /join #geex (ofcourse you need to do this after you are connected to the server)
You can check the help for commands in there, you can also write your own scripts to handle events in many scripting languages. Am not doing any though, cause tmux would notify me if something changes in that pane such as a new chat or so. You can switch between channels and private chat windows with "alt+window number" which shows down the window. Usually 1 is the server window, 2 is the channel, and so on.

MSN:
This is more tricky as the program am using is not available on the repositories of Ubuntu. There is a library for MSN for many programming languages as far as I know and you can write your own program, but why bother? I found a ready program called "gtmess".
The installation process was simple. You have to download the following archive. And follow the following steps:
1-Copy the archive to a temporary folder where you want to compile and build the program. You can delete this folder after you finish your installation.
2-In that folder open a terminal window and start by extracting the archive using:
tar zxf archiev-name (-C location)
The archive name should start with gtmess when downloaded. The -C location is optional in case you want to extract in a different directory than where your archive is.
3- In the extracted folder do the following:
  • Configure by running "$./configure." In my case I was missing the ssl library, the issue was solved by installing libssl-dev ($sudo apt-get install libssl-dev). You might encounter other missing dependencies but I am sure you can manage if that was the case.
  • Make by running"$make" in the folder.
  • Install by running "$sudo make install".
Simple ain't it (:.
Once you are done, you can run the program by typing "$gtmess" and you should get the interface as in the figure below. Don't worry, you'll get used to the interface quickly.
Following are some useful shortcuts you need to start with. Press F9 to receive a menu where you can navigate using the arrow keys and enter to choose. Choose "connect" to start, and input your email and password when asked. Once connected you get a list of contacts on the right. You can press tab to switch to the contacts, scroll down with arrow keys and press enter to start a chat. You can create a new chat window by pressing "ctrl+N" and invite users to it by typing their nicknames. You can switch between chat windows by pressing F1 and F2 . Finally you can hide your offline contacts by pressing "ctrl+F".
Those are main keys I use in the program, you can find more by typing ? in the window and pressing enter (of course ..) to get a list of useful keyboard shortcuts.

Simply, you can keep in contact with your family and friends while doing work. Using a key or two to quickly switch between both and not having to move the mouse (:. Hope you guys enjoy this.

*Note: As the screenshots suggest, this was written early in the morning. Thus, many mistakes might exist, I will correct them when noted.

Monday, June 6, 2011

Germany speaks SOAD!

In the last weekend I was in Rock am Ring, a rock festival held annually in Germany. You can find more details in Wikipedia page. Talking a little about the experience, it was great overall. The camping was sucky, you'd enjoy that if you had a large group of friends or was really drunk. Both of which I didn't have. However, watching rock concerts live is just amazing, much better than I expected or what you'd expect from watching videos online. I'd leave the details for you guys for whence u try it (:.
In most of the concerts the audience would sing some parts of the songs or the major songs of the band they are attending. However, in System of a down the situation was different. I was in the audience and I swear I barely heard Serj or Daron singing! It was all the audience, singing every single word in the lyrics! Just amazing! I am gonna watch the concert again on YouTube to know what the hell the band sang :P.
I am pretty sure if you ask the audience if they speak English, 70% of them would say no! But when it comes to System of a down, they fucking do perfectly (:.
I will leave u with a video from the concert, hope YouTube won't take the vods out soon for legal issues.

Saturday, May 7, 2011

Through countless years

Lost in a sea full of haze, trying to find a new home
Trying to float, but there is a hole in my boat
They haunt me, they tell me I should not go any more
Marching, but my vision is lost, my destiny is wrote
I need to be alone, but they are inside my soul
Fighting, but my power is drained in every mote

Gasping for breath in the sea of gods, lost my two companions and fading away, I am about to fall ...

This should have went on before this. But for some reason I couldn't find it, so thought I'd repost.

Friday, February 25, 2011

Oranges Vs Apples


In one of my exercises , I drew a graph without labeling X and Y axises. The tutor complained by writing "oranges vs apples?".
And yes, next exercise we wrote that for her :P.
(just felt like sharing, it was mainly Martin's idea, my partner.)

Monday, January 24, 2011

Safa6a , صفاطة

Guys, just wondering, any of you knows a game called "صفاطة"? You could know it in a different name so I will explain how it works:
-Description: A 3x3 grid turn based game.
-Players: 2 players
-Tools: Board, 2 sets of 3 pieces (usually we us
ed to play on a board drawn on sand, 3 pieces of stick and 3 pieces of paper "mka3bal")
-Initialization: Players put their pieces on the grid in a turn based manner, pieces can be anywhere but they can't form a horizontal/vertical line of size 3.
-Game play: Each player get one move per turn, in which he must move one of his pieces one step either vertically or horizontally.
-Goal: Get a straight line first.
-Challenging? I remember it was, at least for us when we were kids, you had to plan how to interrupt your components plans and at the same time work on your plan to achieve that line.

Why am I bringing this up?
I was working on an XO homework, and it hit me, we used to play this game a lot, but now, I don't recall seeing kids playing it at all, so am just wondering, what's the origin of this game and stuff.
In the image below, you can see a rough sketch of the game (the usual thing), and the pieces of two players (green vs red) in a classic start up position. The game is pretty much solved, and can go in endless loops, but for kids, It can be challenging (and by kids I mean ~first grade), and I wonder if this could be expanded to larger grids or dimensions.

.

Best,

Friday, December 17, 2010

Mushrooms ?

(TIL)
Dependance vs Active/lethal dose
Well, I guess mushrooms (Psilocybin) is not bad after all. Nicotine is more addictive and harmful. So is Alcohol (More harmful, less addictive than nicotine).
Harm/Dependance
Issue is, people smoke shit loads of cigarettes a day, that is why I think it's more dangerous to smoke than drink.
It's interesting that khat (well known as qat) is least dangerous, but more addictive than some.
(/TIL)

My friend told me about some of his experiences while having mushrooms, funny one was, he was laying in bed, and he saw a one eyed elephant on the ceiling laughing at him. The elephant was his Ceiling light, the bulb was the eye and some wire was hanging and looked like the nose (:


Cheers and enjoy this mush-roomy link:
Cinderella !

Thursday, September 23, 2010

Backyard

It's amazing how much you can do in a 350m^2 backyard. Am talking about planting.
I am now on vacation, visiting my family in Palestine, am talking about their backyard. They have 7 raws of trees, each has ~6 trees in it. Ranging from all kinds of citrus tree (Oranges, Lemons, Mandarin, Valencia..etc), to apples, annonas, bananas, almonds, mangoes ...etc.
There are also vegetables, they change every year, this year we have eggplants, chillies and some greens.

It includes some hard work, at the beginning u have to do a lot of watering, and if u do that manually, u have to deal with wild plants; those are a pain in the arse ! Specially when they have needles on them. We use some techniques for watering that supplies water to all trees at once. Yet, this is not enough. Some trees require more / less water, so u have to deal with them manually, Specially in their season of fruit. You also have to deal with nutrition for the trees, bugs and tree diseases.

The outcome, its just amazing !, right now it's the season of guavas, banana, apples, and all kind of citrus trees. Other than the vegetables of course. It's amazing to get every day sth like 6kg of fruits from the backyard, going there in the morning, looking at the trees and collecting their goods, having a great fruit breakfast, makes it worth all the trouble you go through to reach this result. In the link below you can see pictures of the back yard, trees and fruits. Enjoy (:
http://www.flickr.com/photos/mohqas/sets/72157625018084722/detail/

I hope that I will have some nice yard in my place as well.

Monday, July 26, 2010

Pictures

Wow, this blog is full of pictures; flat emotionless, yet joyful to see.

Friday, June 11, 2010

A hero from intifada.

One of Intifada's heroes:
This is kinda old, but i just somehow came across it again, and wanted to share it with you.
The guy name is Thaer Hamad, he was born in 1980 in the village of silwad, and now he is in Israeli prison for 11 life times years. (each 25 years)
What he did, is basically, using an M1 rifle from WW2 and 24 bullets, he managed to kill 11 soldiers and injure ~9 more (20/24 hits) ! until his rifle exploded on the 25th shot. And I guess you have an Idea how armored those soldiers are. He was good ! Source.
Even the Israeli army and investigators thought that he was one of the Irish republican army or was trained by the IRA, according to this.
What I liked the most is a letter he wrote as a reply to the mother of one of the soldiers he killed, when she asked him why he did that, you can read that all here.

Thursday, June 10, 2010

Life would be much cooler

If portal gun was real ! It's much easier to move through portals
If this lion was my cat ! Some action around wouldn't hurt.If this band was playing rock & roll at royal ceremonies , and my job was the drummer, who needs a better job than riding a horse and drumming ?If you could swim here:
Finally, I'll leave you with this song:

Tuesday, March 23, 2010

Alton towers tour

I am in UK at the moment, visiting my brother, we've planned many trips and today was Alton towers day, an amazing experience I hope every one could try ! I'd thought I'd share some of this experience with you guys, so here goes:

Alton towers is a theme park built around an old rock above a nice hill in a village called Alton. Very beautiful nature in there and AMAZING theme park that mostly have nice roller coasters ! Which I love the most, first let me start with some snapshots of the nature of the place:

I guess the pictures speak for them self, the place is HUGE and amazingly beautiful (:.

The rides:
First .. unfortunately we tried a very amazing and scary ride :P. I forgot it's name but basically, it goes high then stands 90 degrees heading towards the ground, and free falls ! into the ground the continues on a track, fast .. really fast and creepy !, here is a picture of the track and a video of the ride:

video

Second big ride was, the hex. It's a family ride that explains some spooky story about the rock in the theme park. what was interesting about it is that you enter the last room, you set on some chairs and the room start rotating ! at first it starts rising up and down then complete rotations ! and u are upside down and u don't feel much that u are rotating like other games, i dunno why, maybe because its a large thing that is rotating. I was laughing so hard there cause of that :P rotating and not feeling it much !

Third one , was Ritta, a normal coaster train but what is special about it, it launches really fast at the beginning ! check the video to see what I mean ;) . Also a picture that shows parts of the track:

video

Then, there was a roller coaster called thirteen, its a new one, opened 3 days ago only and it has a very nice trick :D . I don't wanna spoof it for you so if you really want to know it :P just let me know by chat ;)

Next one was a hell ride ! called nemesis, i guess the pictures would speak for them self:
And the track:
Simply, check this video on youtube to feel the ride ;).

Last big one is called Air, simply u are upside down in the ride, and turning in all direction :P , I will let the video explain:
video

These are the rides I liked the most, many more I just don't have the time to write or upload about . I guess its enough so far, we were there at 9 am and we left at 5 pm even though we rushed to every place and I guess we still didn't cover it all :P , so yea, a very nice place for a 2 days vacation or something, if you are going to UK, Alton towers is a must!
Cheers.

Friday, January 1, 2010

New year eve in Bonn.

At Bonn, we went up a mountain that over looks both Bonn and Kolen. Unfortunately it was Foggy. Yet, the view was awesome ! There were fireworks every where. Here is a video to show some of the action:


Sorry for the voices :P But we really were surrounded and scared that we'd get shot :P.