How to capture direct stream links from webradios



Why
  • To be able to play web radios with your favorite player.
  • To spare yourself the use of a browser (or the web radio's proprietary app). No more need to open the radio website and keep that tab open (with all its annoying ads).
  • To save your device resources: an NRJ radio tab and associated flash plugin will consume around 200MB of RAM.
  • To feel powerful.
Problem
  • Kind radios provide you with the direct link. Most radios are not kind.
    • When radios are not kind and you are sharp, you press Ctrl+U to view the page source code and search for the link yourself. But if radios are evil they will hide the link inside Flash code. You then need to download and decompile that source, which is tedious.
    • Here is an easy and straightforward way for all situations.
How
  • Open Chrome. Well, you're already in.
    • If you use IE, you shouldn't be reading this post in the first place.
    • If you use Firefox, follow the steps here for Chrome and try to find your way with the fox.
  • Open the web radio.
  • Press Ctrl+Shift+I (or go to the options menu > Tools > Developer tools)
  • Select the Network Tab.
    • This lists all the page's HTTP requests.
    • You may need to reload the page if the list is empty, This works in real time and needs to acquire the requests.
  • Make sure your stream is playing.
  • Locate the broadcast element.
    • It's most easily located by sorting the contents by size, the element with the biggest traffic (and increasing) will be our stream.
    • Click on its name. A pane of details will appear, go to the Headers tab.
    • The first line, Request URL, is our stream!
  • Now take your precious URL and open it with your favourite player, Winamp, VLC, etc.
    • You can strip the URL off its query string, i.e. what starts with the question mark:
      http://95.81.147.7/3804/nrj_3804.mp3?type=.flv&amsparams=playerid:WebPlayer+5.0;skey:1361349427

Eco Vadrouille

Abou-Al-kacem El-chebbi, a famous Tunisian poet said:

And that who doesn't love to climb mountains, will forever live among the pits

From our balcony I have always looked at the majestic mountain of Bougarnin that dominates the whole bay of Tunis, telling myself one day I will get that summit. And once I did, the addiction endeavored me.


Things turned quite well as shortly after my accomplishment I met the newly formed Eco Vadrouille, a group of people passionate about nature and mountains. Every now and then we pick a mountain in Tunisia and head for the top. I don't feel the need to describe how amazing it is, because it just doesn't make sense to me how some people aren't naturally attracted.
So if you are in a good shape and attracted by mountains, you shouldn't miss the blog and facebook group.

How to cook Couscous

It's only natural that the first Tunisian recipe I write be our typical dish, the couscous. It's a regular meal in the maghreb (Tunisia, Libya, Algeria, Morocco) and has become popular in many countries. Couscous stands for the "international" naming, in Tunisia we call it Kosksi (read "kosksee") and that's how I will refer to it during this post (it's my transliteration so you may find other spellings such as "cosksi"). To avoid confusion, it's worth noting that the word kosksi refers to both the dish and the grain product on which it is based.
One more thing, I googled how to cook couscous and results were really laughable for a Tunisian. That's one of the reasons I decided to post the recipe here, so I hope it contributes in making a better world!

Preparation time
  • 1h45m
Utensils
  • Couscoussière: a kind of steamer, the upper part over the pot is called "keskas", a kind of colander, see the pictures.
  • Ladle
  • A very large bowl
Ingredients for 8 people[1]
  • 1 Kg kosksi
  • 8 pieces of meat[2]
  • 2 big pieces of pumpkin
  • 2 potatoes
  • 4 small onions
  • 8 peppers
  • 100 g soaked chickpeas[3]
  • 1 cup olive oil
  • 3 tablespoons of tomato paste
  • 1 non full tablespoon salt
  • 1 overfilled tablespoon red pepper powder
  • 1 teaspoon black pepper powder
  • some nail cloves (optional)
1. Seen that the preparation is not fast, meals such as kosksi are prepared to be eaten at least one other time after they remain from the first meal, so here 8 people means 2 meals for 4 people.
2. Usually lamb or chicken, but can also be rabbit, camel, cow...
3. Leave the chickpeas in water for half a day

Directions
0:00 pour the oil into the pot and light the stove
  pierce each pepper with a knife introducing some salt
0:04 put the pepper into the pot
0:10 remove the pepper
  put the meat, onion, chickpeas, salt, red and black pepper powder, stir
0:15 pour two cups of water, preferably hot
  add the tomato paste, stir
  increase the flame and cover with the keskas
0:25 stir, decrease the flame
0:37 add the pumpkin and potato
  add water (still preferably hot), around 4 cups
  increase the flame
  put the kosksi into a large bowl (optional: some nail cloves)
0:40 the pot content is boiling, take the sauce from the surface 3 times with the ladle and put it on the kosksi, mix
  add a cup of water or two into the pot
0:47 put the kosksi into the keskas over the pot
0:50 when vapor starts to break up through the kosksi, you leave it for 45 minutes
1:35 remove the keskas from up the pot and put the kosksi back into the large bowl
  take the meat, onion, potato and pumpkin off the pot
  add 2 cups of water
1:42 switch off the flame
  using the ladle, take the sauce from the pot to the kosksi, mix. Not all the sauce is to be put, only enough for the kosksi not to taste dry.
1:45 ornate the kosksi with the chickpeas, meat, pepper, potato, onion and pumpkin

Notes
  • Usually we don't just say kosksi, but "kosksi with something", in this recipe, our something is meat. There are a lot of others somethings: fish, vegetables, "osben", "chebtia", fennel, etc. Preparation sure varies and you can't tell you know kosksi if you only tried one variation.
  • Kosksi is usually eaten with "rayeb" or "lben" (at leat in Tunisia), both are fermented milk products.
  • The timestamps used in the directions are only indicative, not to be followed with a chronometer!
  • When you increase the flame, don't overdo it because eventually that forms a layer of carbon (hard to get rid of) under your pot (or whatever you're cooking on).
Pictures



Shehya tayyba ! (Bon appétit)

The Generation Gap, Explained


Before getting started

How does each one of us reach his personal level of information, of intellect and intelligence ?
It is very difficult to answer this question without tackling with the definition of intelligence, thus as far as this subject has only for purpose the explanation of the gap existing between generations, we will consider a set of assumptions:
- Intelligence is the set of experiences in one's life, and it is to a certain point, connected with the amount of knowledge that one holds.
- An important aspect of intelligence is wisdom.
- The human being is egocentric.
Whether you are approving or not of these assumptions, you will understand their use a bit further so just be patient.

Once upon a time...
Supposedly we are born "blank", but in reality we do have two givens : the human instincts, and our parents' DNA. During their life, our parents have gone through a lot of experiences, learned many things, and that build their personality. Based on that personality, they are going to grow us. Our childhood childhood is a crucial part that determines our character : we will be "based" on all the principles and behaviors that our parents teach us in our very childhood, those things, they have spent all their lives setting them up. So in a way, we are acquiring the essence of their life learnings.

The non-vicious circle
Later when we are grown up, we start to build our own character based on our own experiences and we collect the information that consolidates our mind, which brings us to end up with our own personality.
We make children, and the same pattern keeps going on and on ...
This is a continuity, but are we turning in a vicious circle ? Not really, as we said, personality is based on the childhood, which means the parents. And the parents did not come out of nowhere, they have their own parents, and so on. Meaning, that our personality, is somehow, the sum of all those of our ancestors; we are talking about the social evolution.
Now, how about facing my tenth ancestor and comparing my personality with his ? That would be one hell of a difference wouldn't it ! I am far more... "developed" that him, because I am already him, plus, a dozen of essences of personalities of those who followed him.
When we state the word personality, we sure have to think about all its facets, mainly including intelligence, reactivity, and principles.
In our life we generally only interact with four generations : our grandparents and parents, our children and grandchildren. What do we end up with ? In a very rough way I would say : being more intelligent than our parents, and less intelligent than our children. That, is one aspect of the gap between generations.
There will surely be some, if not many, variations to this general rule, and that is due to the differences between the cultures and environments and so on... Or more scientifically, that is due to each one's own genetic path that goes up back to Adam.

Yes but, clearly ?
If I do have problems with my parents, or my children, now I know why they can't understand me, and I shouldn't be expecting them to understand me, because I am not living the same generation ; either I am a new form of them (my parents), and they can't evolve to understand me, or I am an outdated form of them (my children), and I can't evolve to understand them.
Same thing with all the people around me ; kids, students, workers, seniors...

Still...
Now let's try to see things from a different side, this time in favour of the old ones.
If we consider one's lifetime, youth will always be at the back, and living more implies knowing more, more experience, thus more wisdom (with all the depth of this word's meaning).
We have from one side, the youth, subtle, reactive, but lacking wisdom, and the old, relatively slow, but wise. That makes the second facet of the generation gap.

Someone young will never understand why the old one keeps saying "oldish things", he will have a rebelling attitude against the decisions imposed to him, he is surely keen, but he lacks that experience that allows him to make valuable judgments.
The old one from his side, abuses of his power position, he will always have in mind that he is more experimented and apt to judge and take decisions, and that the young doesn't know anything, but he lacks the generation update that allows him to see things in a new way.

So ?
Whether you are young or old, are the others functionning at a very slow rate, or too fast for you ?
Are they too much open minded or not permessive at all ?
So what's the solution ?
Solution ? why ! Is there a problem ? We don't have a problem here, that is just how things are, and unless we want to bend time and space, we have to cope with the social evolution. If "coping with something" isn't a good conclusion, then here's another way to tell it: the idea is that when you know how things work, you know how to better deal with them, but when you don't, you just keep fussing around and commit mistakes. So let's not blame a different generation for being different from ours! And rather try to get the best out of it.

Know your world better, to live better.

P.S : if you still remember the assumptions I've mentioned above and are still waiting for the explanation, it means you missed it, so you can either read again or just forget them :)

Introducing Tunisian food and eating conventions


In general bread is always present in the Tunisian table, and you will find mainly two types of meals, those eaten with bread, and others with spoon (or fork). This makes the presence of the knife, fork and spoon facultative for your plate, unlike in the occident culture where the only exception to their presence is sandwiches or maybe pizza.
You can think of bread-based meals as viscid broths, viscid in the way that it 's cooked long enough for the sauce to be thick and homogeneous, so you don't see water.

Two things will be almost always present in the list of ingredients: harissa and tomato paste. If you don't find harissa you can replace it in smaller amounts by chili pepper powder. As for the tomato paste, the replacement is to boil tomatoes, peel and then mash them, the amount will be twice as much as for the paste.

Here is a famous book of Tunisian recipes, it's in Arabic but like children you can look at the pictures :)
At the same time, I'll write detailed recipes of meals from time to time.

How to download videos with Google Chrome


When I moved to Chrome I tried to find equivalents to all the extensions I was using in Firefox, including video downloading managers, so I first had to switch to the 4.x Beta as the 3.x version didn't support extensions yet. But at that time there were no downloading extensions at all, as Google didn't yet release the APIs for that, so what I did was switching to FF (and waiting an eternity for it to start) whenever I wanted to download a video. Until one happy day, in Chrome I played a video I had already played some days ago, it instantly loaded! Which reminded me of the browser cache, I went searching for Chrome's cache folder, and there I found all the played videos !


Conclusion: To "download" your videos you just have to play them and you'll find them in the cache folder !

You will find a lot of files there with unrecognizable names and without extensions, so to spot your videos you can sort by size or by date, it'll be easier in Linux as it doesn't need extensions to display file thumbnail previews.

Chrome's cache folder in Linux :
/home/your_user_name/.cache/google-chrome/Cache

Chrome's cache folder in Windows XP :
C:\Documents and Settings\your_user_name\Local Settings\Application Data\Google\Chrome\User Data\Default\Cache

Chrome's cache folder in Windows Vista :
C:\Users\your_user_name\AppData\Local\Google\Chrome\User Data\Default\Cache

Chrome's cache folder in Windows 7 :
C:\Users\your_user_name\AppData\Local\Google\Chrome\User Data\Default\Cache


If going through all the files in that folder is frustrating, you can always use the extension Click&Clean that has a feature to play and save the videos present in your cache.

Colors


This article was originally intended to describe some method I figured out to find colors that match each other well, but I have rapidly found widening the subject in order to be able to technically talk about colors; an introduction to the concept of colors is mandatory to fully comprehend the method I describe later.

Once upon a time, there was the Sun !
Basically made of Hydrogen and Helium, the sun's job is to ensure some chain reaction between those elements, that produces a massive amount of energy, which is expelled in the form of radiations. A radiation is mainly characterized by its frequency, so we have classified radiations by frequency ranges (called spectrums), and here I name the main ones :
Cosmic Rays, Gamma Rays, X-rays, Ultra Violet Rays, Light Rays, Infra Red Rays, Radio Rays. I'm sure you met some of those names somewhere.

The sun is not the only source emitting radiations, your screen for instance is doing the same right now but with just light rays (unless you're reading from an e-ink e-book reader).

Now, it happens that the Light Rays represent the spectrum to which the human eyes are sensitive; meaning that we can see that set of frequencies. Our eyes are a peripheral, they serve as decoders of light rays, converting them to electrical pulses that go to the brain, and he tells you : dude, that's blue ! Surely, after it's taught that that thing is called blue.

We did arrive to the colors, but we haven't yet finished with the rays yet. If colors are light rays, then what's the difference between blue, green, purple and the others ?
Well, it is the same as earlier when we have classified the rays; if we divide the light rays spectrum on its turn to smaller frequency ranges, we find in order :
violet, indigo, blue, green, yellow, orange, red.
Remember your childhood painting lessons: when blue and yellow make green? you'll notice that in the list I've written above, green is between blue and yellow ! They should've explained that to us eariler...

Now let's summerize ; a color is a radiation of a certain frequency.
Now what about the black and white ?
In fact, these two aren't colors, they are light values. In other words, they are indications to whether or not there is light.
Let's consider this following frequency : 440 THz, it's the red. If a source only emits that frequency, then we see red, but if the source also emits another frequency with that one, then we see the mixture of the two colors (like when you mix watercolors), and if the source emits all the colors' frequencies, then we don't see "any color" : it is white ! Now if the source doesn't emit anything, there is no frequencies at all: that is black !
Grey (which is not a color but a light value also) represents somewhat the middle : the source does emit all the frequencies but that's neither enough powerful to be white nor totally null to be black.
Now just one thing before you assume you've understood everything : in painting, when you mix all the colors you got, you don't get white, but black ! But I just said white is the mixture of all colors...
Colors are frequencies, but painting is not, it is matter : pigments, thus is does not emit rays, but absorbs them (like all the matter around us), and that makes all the difference ; when the matter ( a car for example) absorbs all the light, there is nothing left to see : you see a black car, but if it does not absorb anything, it reflects (bounces back) all the light, : a white car ! and if it absorbs everything except the 440 THz frequency, that frequency is reflected and goes back to your eyes and you see a red car !
(Grey here means the car absords only a little of ALL the frequencies, and reflects back the rest)

Now if you clearly understood the whole of that, you are almost ready for the method to find matching colors.
In order to obtain a certain color, we mix some colors together, and people found out that with the follwing magical three : red, green and blue, we can make any color we want !
We are indeed talking about primary colors. But aren't the primary colors red, yellow and blue instead of red green and blue ? Both are correct, the former set are passive (matter that reflects light), and the latter are active (light itself).

Have you ever met these initials : RGB ? that's RedGreenBlue, you mostly see that as a color balance setting in your screen. So, in order to get a certain color, each of these three has to get a value, this value might go from 0 to 10 for example, or from 0 to 1000, the bigger the range is, the greater amount of colors we can get ; we talk here about color resolution.
If you go to your display settings, you will find "Color Quality" usually set to 32 bit, that represents the color resolution, 32bit means that the values range from 0 to 4 294 967 295 !
In computer language we use a different system of numbering than the one we use in our everyday life.
The "decimal" system, from the latin decimus: "tenth" (i.e. based on ten numbers)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14...
The sequence is to put all the numbers in order until the last (9) and then we add a digit on the left and we start counting again the numbers on the right.
Computers work with the "binary" system, from the latin "bini" meaning "two together", so there are only 0 and 1, and here is how it goes :
0 1 10 11 100 101 110 111 1000 1001 ...
Computers use a more convenient [for them] numbering system which is the hexadecimal (hex is Greek and means six), hexa-decimal means 16 basic numbers:
0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 ...
If you keep looking at those numbers for a while you'll get it.

Now you are finally ready for the secret method!
Open the very simple painting program "Paint", or any other similar program.
On the menu bar, go to "Colors > Edit Colors" and click on "Define Custom Colors", on the bottom right, you have Red, Green and Blue, each one with his value.
(You find also Hue, Saturation and Luminosity, they represent another way to compose colors, but for now we'll do with RGB so that you get the idea and later you can find your own way)
Try to set some random values to the RGB and you'll see it gives you different colors...
In Paint, the values range from 0 to 255 and it uses the decimal system, in other software you will most commonly encounter the hexadecimal system, with values ranging from 0 to FF (wich is equivalent to the same: 0-255 in decimal).
If you see 05FF7A that means 05 of Red, FF of Green and 7A of Blue, they are always in that order : RGB, and for that resolution always 6 digits, 2 for each color : RRGGBB.

Now comes the art, the method I'm going to describe is based on the assumption that two or more things that go well with each other have a certain logical relationship linking them, and I'm proving it right now:
Still in paint, pick any random value between 0 and 255, 30 comes to my mind.
Pick another random value, that'll be 20 for me, and choose a simple mathematical operation, addition or subtraction... That'll be addition for me: 30 + 20 = 50 (I cared to choose an operation whose result will still be included in the 0-255 range). Do the same again: 50+20=70 and I have now three values: 30, 50 and 70, circular permutation to get three colors:

Color X: Red = 30, Green = 50, Blue = 70.
Color Y: Red = 70, Green = 30, Blue = 50.
Color Z : Red = 50, Green = 70, Blue = 30.

If you put these three colors side by side (make a simple drawing)...
You'll be surprised to see they go so well with each other :)
I'm not saying they are great colors, because that depends on your taste, I only say they go well with each other, meaning hey are harmonious together, independently from their "look".

With this method you have a lot of possibilities, but just two or three colors (X, Y, Z), but you got the idea, so you can practise with many combinations and operations, just make it that there is a logical relationship between the three values.
If you're a little skeptical about this, pick any picture you know in which you find that colors do really match each other, and for each color in that picture, get its RGB values (pick the colors with the color picker tool in your software, and go edit the color so that you get the values), write them down, look at them together, and you'll see there is a mathematical relationship linking them.

The idea in this article, behind aiming to explain some basic color concepts, has been to roughly show, that a generally, taste is not such a subjective concept when it comes to find things that fit each other, everything in this universe is linked, and there is an explanation to all of those links, we don't always know or understand most of them, which misleads us in dealing with so many things...

Know your world better to live better.