The Victory

They hope for victory. They say one day, they will be victorious. They will be ruling the world.

Why should I care if in 1000 years, you’ll be taking over the world? Didn’t your message say that it is the next world that matters?

Why does hoping for victory make you so excited? What will it prove even if the world belongs to you in 1000 years? What is victory?

Prophets ruled the earth. Dictators/evils ruled the world. Their kingdoms fell…

…and the children hope. One day, they shall be victorious again.

Cookie and Cookie Jars with REST API

Been playing with ERPNext a bit recently. Tried to test the REST API so as to learn how it works.

In the Frappe documentation, it says to login like this:

snapshot1

Tried the following code in my terminal and it worked

$ curl --data "usr=Administrator&pwd=admin" http://localhost:8000/api/method/login

However the API to test whether the user has been logged in was not working

$ curl http://localhost:8000/api/method/frappe.auth.get_logged_user

It would NOT work :-/

If i would paste the URL in my web browser, it would recognize that i was logged in.

I realized cookies are being used. To do it from the command line, all i had to do was create a cookie jar and later fetch the cookie from the jar 😉

$ curl --data "usr=Administrator&pwd=admin" http://localhost:8000/api/method/login --cookie-jar lol

$ curl http://localhost:8000/api/method/frappe.auth.get_logged_user --cookie lol

It would finally recognize me now. 😀

Democracy

Democracy is marketed as the ability of the people to have power in their hands. But what is it actually?

Every 5 years, for 5 minutes, you have the right or power to put 3 crosses on a sheet of paper next to your favorite candidates.

5 Years contain approximately 2,592,000 minutes.

The rest of the 2591995 minutes, it is a dictatorship. Our hands get tied up. Our mouths gets taped. Sticks are put in our wheels. Literally.

Employees and students wait for the Prime Minister’s and the President’s car to go before to be able to reach their office and schools.

  • Did the people want the Mauritian beaches to be sold to hotels and restaurants?
  • Did the people want speed cameras? Or roads which are safe, fast and efficient?
  • Did the people want Rs 50 million crappy gov.mu website?
  • Did the people want frauds? If you’re a ‘petit copain’, then yes
  • Did the people want the Government to store their fingerprints and bio-metric photos?
  • Did the people want a Rs 2 billion prison facilities?
  • Did the people want to increase the bus fares when it was already high? 1,2

But now, something bigger is going to happen. We won’t even have that 5 mins. The current PM wants a permanent seat on power by planning to become President. The opposition joined the government. What do we have now?

Can we choose who we want to be our dictator? Or can we choose our supreme dictator?

Schedule Downloads at Night on Raspberry Pi

The best time to download heavy files is at night. Because during the day, you need the bandwidth to do your own work. A Raspberry Pi is ideal for downloading. It doesn’t consume lots of power. It can be plugged directly into your router’s USB port for power and Ethernet. You can also attach an external hard-drive to it.

CameraZOOM-20140905212531444

wget

$ sudo apt-get install wget

It is installed by default in Raspbian and lots of other Linux distros.

at

$ sudo apt-get install at

at allows you to schedule a command at certain time.

Let’s say we have to download Qt for Android 5.3.1 (Linux)

$ ssh pi@192.168.1.x
$ echo 'wget -c http://download.qt-project.org/official_releases/qt/5.3/5.3.1/qt-opensource-linux-x64-android-5.3.1.run' | at 02:00

The -c argument tells wget that if an existing download was in place, resume it 😉

Remember the Anil Bachoo Stupidity Fund?

He increased all bus fees by Rs 2 because of mismanagement/fraud in NTC and he didn’t want to investigate into the matter.

See how each time i paid the bus fees, the Anil Bachoo Stupidity Fund (ABSF) stands out.

Why give Rs 2 on top of Rs 25, Rs 100 and Rs 200 notes?
Because the conductor would eventually ask me if i got Rs 2 so that he/she could return me a Rs 5 or Rs 10 coin.

Rs 2 per travel. If you take 4 buses per day, it makes Rs 8. Anyways. Government bribe people. People will vote again…