Raspberry Pi programs on Laptop

Sometimes, using the command line is hard. I just want to put a torrent to download on my Raspberry Pi without having to perform command-line Karate.

I open my terminal on my laptop, type in the following:

ssh -X pi@192.168.1.200 transmission-gtk

snapshot1

Lo! I get the program opened on my laptop and use “normally” 😛

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?