martes, 30 de agosto de 2016

slime inspect + eval

When inspecting some value in slime-inspector, you may want to evaluate forms on that value.

That's what 'e' `slime-inspector-eval' is for.  What the docs do not put very clear is that '*' is the variable bound to the value.

domingo, 7 de agosto de 2016

Setting the date of my raspberry pi

I use my rpi as an alarm clock.  It works well because you have mplayer and cron.  And that's basically it.   I used picolisp to wire everything together (and wrote a simple hack to snooze the alarm).

But one of the biggest annoyances is that Rpi doesn't have a clock on its own, so when it looses power (I disconnect it), the clock is reset, so the alarm clock won't work.. :(

As I've read "The Unix Programming Environment" lately, I'm quite fond of shell scripts now, and I got to this 4 level quoting that sets the date of my raspberry pi from my laptop.

ssh pi@ -o ConnectTimeout=60 sudo date --set="\"`date '+%d %b %Y %H:%M:%S'`\""

I'm somewhere between very proud and very ashamed of that, but well... it does the job.