Showing posts from 2010

Google Safebrowsing Google!

I will leave you with a nice screen shot, testing Google with Google's safebrowsing

Apple | The Art of Fooling End Users ?

If you are an Apple-products fan, please take it easy or leave now as all of this post may not appeal to you.

Starting from scratch, Apple has a trend in marketing its products.

1- Build version one with incomplete features though the technology is present and cheap.
2- Market the product as the simplest thing ever next to "saying 123".
3- Build version two with a little bit more features and much higher price.
4- Claim that upon user demand you had to add these features.
5- Keep the little secret inside, it is tying software to hardware.

Looking at iPads, I get a sense that Apple is not respecting its users. Making things overly simple and thrwoing in standard features slowly in next versions is lame.

You > iPad supports 3G.
Me > well my 2-year old Nokia mobile does too!

You > iPad has capacitive touch screen.
Me > What devices on earth don't now?!

You > iPad is lightweight.
Me > Technology devices are supposed to be, no news!

You > iPad is backed …

This is what you get when you donate to Wikipedia

I donated one USD to Wikipedia a few days ago. It really made me feel worthy :)
This is the body of the email they sent me, I am adding only two CRs [carriage returns] just for the blog to look better:

Dear Angie,

Thank you for your gift of USD 1.00 to the Wikimedia Foundation, received on October 20, 2010. I’m very grateful for your support.

Your donation celebrates everything Wikipedia stands for: the power of information to help people live better lives, and the importance of sharing, freedom, learning and discovery. Thank you so much for helping to keep Wikipedia freely available for its 380 million readers around the world.

These funds support technology and people. The Wikimedia Foundation develops and improves the technology behind Wikipedia, and sustains the infrastructure that keeps it up and running. The foundation has a staff of about fifty, which provides technical, administrative, legal and outreach support for the global community of volunteers who write and edit Wikipedi…

Probably a joke .. ?

While walking, an engineer, a system administrator and their boss found a lamp. They rubbed it, and lo and behold; a genie appeared.

"You can have three wishes, but since there are three of you, I'm going to give each one of you one wish," spoke the genie in a large, booming voice.

The engineer said, "I wish to be working for NASA in making the first spaceship to transport astronauts to Mars." With that, the engineer disappeared in a puff of smoke.

The system administrator said, "I wish to be in an island filled with machines that never crash so I could study from them and learn". The administrator smiles as he vanish in a puff of smoke.

The boss said "I want both of them back in the office by Monday."

-- Unfortunately I can not recall where I found it online, but it spent a good long time on my HDD.

Protecting against SSH attacks

On some servers you are obliged not to run a firewall nor use VPN. As a result your sshd will be the direct attack target for many amateurs and professionals alike.

To protect against ssh attacks, I run the following script in crontab:

#! /bin/bash
# A script to automatically counter ssh attacks
# vars
# logic
# get unique attacking IPs
grep "Did not" $secure | awk '{print $12}' | uniq -u > $file
# if IP is in /etc/hosts.deny do nothing, if IP is NOT in /etc/hosts.deny, add it there!
for ip in $(cat $file); do grep --silent $ip $deny; if [ $? -ne 0 ]; then echo "sshd:$ip" >> $deny; fi; done
# exit as learnt
echo "we have exited $RETVAL"; exit $RETVAL
Sometimes you may encounter a line in /etc/hosts.deny like:

It may be blocking you!
Be aware, I have warned you beforehand.

Arabic URLs in Varnish

Varnish is a powerful caching, reverse proxy server. At Al Masry Al Youm, we use it to speed up page loading times for anonymous users.

A few months ago I managed to get it parsing Arabic URLs. Take a look:

req.url ~ "^/ar/%25D8%25AA%25A3%25A9"

The secret lies within the 25%! Try to guess the word in Arabic ;)