The Sacrifice

Ismael offered himself to be sacrificed. Voluntarily, he told Abraham if “God” commanded the latter to do so, then do so!

The poor animals. Have you seen tears in their eyes? They cry.

They resist when you try to tie them with the rope. They kick back. Do they want to be sacrificed as Ismael did? Do they lay on the ground telling us: “come on, we’re ready. Do what you are commanded to do!”?

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. 😀