My thinkpad's screen start flickering one month ago. It was just a column 1/4th of the width (maybe 1/6th, can't remember now).
I was horrified by the fact that I may have to buy another laptop, but fortunately, it was a matter of 100euros for the LCD.
Watch this for a nice guide on how to change the LCD without messing with unnecessary parts. And enjoy a really nice soundtrack https://www.youtube.com/watch?v=7RwO6ZlyzGA .
So, and today I read in /r/emacs that the CTO of Opera software is a heavy user of emacs, and owns an X220. That's what he says about X220.
viernes, 2 de septiembre de 2016
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.
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@192.168.1.38 -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.
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@192.168.1.38 -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.
lunes, 25 de julio de 2016
git pre-commit blacklist
Here's a simple solution if you want git to not allow you to commit debug messages or blacklisted words.
The nice thing about the snippet is that it only counts added lines, not removed, so you can clean code with this pre-commit active, but never make it worse.
The nice thing about the snippet is that it only counts added lines, not removed, so you can clean code with this pre-commit active, but never make it worse.
FORBIDDEN='declaim\|break' git diff --cached | grep '^+' | grep -n $FORBIDDEN && \
echo "COMMIT REJECTED Found '$FORBIDDEN' references. Please remove them before commiting" &&\
exit 1
slack -> jabber -> irc -> erc
Slack can be used though alternative gateways appart from the slack clients themselves. They offer both jabber and irc gateways that map quite well to slack model.
I had previously used the irc gateway, and erc did the trick with no extra configuration at all. But things changed and now I only have the jabber gateway at my disposal.
The problem is that if you want to use a decent emacs client, you'll have to use bitlbee and end up mapping jabber to irc, so you can use erc/circe/rcirc (which are far better at IRC protocol than jabber.el is at xmpp)
To chat privately other peers it's a matter of /j name-of-the-buddy. Joining rooms is not as direct, and first you have to create some 'mapping' rooms in your bitblee configuration, before being able to join them.
Whatever, here's how to integrate slack with bitlbee (and with erc)
On bitlbee buffer:
And that's it. Now you can slack from erc, and you can use all erc machinery (yes erc-robot, I'm looking at you).
I had previously used the irc gateway, and erc did the trick with no extra configuration at all. But things changed and now I only have the jabber gateway at my disposal.
The problem is that if you want to use a decent emacs client, you'll have to use bitlbee and end up mapping jabber to irc, so you can use erc/circe/rcirc (which are far better at IRC protocol than jabber.el is at xmpp)
To chat privately other peers it's a matter of /j name-of-the-buddy. Joining rooms is not as direct, and first you have to create some 'mapping' rooms in your bitblee configuration, before being able to join them.
Whatever, here's how to integrate slack with bitlbee (and with erc)
On bitlbee buffer:
- chat add 0 room-name@conference.myserver-foo.xmpp.slack.com
- chat list
- /join room-name
- channel 4 del
And that's it. Now you can slack from erc, and you can use all erc machinery (yes erc-robot, I'm looking at you).
jueves, 21 de julio de 2016
TIL: Embedding strings into strings in bash
In bash there's always quite a lot of quoting to be done when you're embeding commands into commands, and possibly want to interpolate some variables.
To save one quoting, there's the option to use HEREDOCS, and assign a string into a var.
To save one quoting, there's the option to use HEREDOCS, and assign a string into a var.
lunes, 18 de julio de 2016
TIL: Remove a defined method (with defmethod) in Common Lisp
I created a defmethod for a more specialized class than the ones existed. and now I'd like to remove that method....
(remove-method #'foo (find-method #'foo '() (mapcar #'find-class '(class-of-first-specializer class-of-second-specializer))))
Suscribirse a:
Entradas (Atom)
