Text

narrow and widen in org-mode

Just discovered org-narrow-to-subtree.

C-x n s     (org-narrow-to-subtree)
Narrow buffer to current subtree. 

Read More

Text

kill -0

Have you seen kill -0 before? I haven’t since very recent.
Here is what info kill has to say about it.

kill [-s SIGNAL | —signal SIGNAL | -SIGNAL] PID…
kill [-l | —list | -t | —table] [SIGNAL]…

The first form of the `kill’ command sends a signal to all PID
arguments.  The default signal to send if none is specified is `TERM’.
The special signal number `0’ does not denote a valid signal, but can
be used to test whether the PID arguments specify processes to which a
signal could be sent.

So what’s the use for it?

I found it useful in bash scripts if you wan’t to make sure that processes are not overlapping.

$ kill -0 >/dev/null 2>&1 6008
$ echo $?
0
$ kill -0 >/dev/null 2>&1 6009
$ echo $?
1

As you can see in that case 6008 existed and 6009 not.

tl;dr

Link

Found it very useful in last days.

Link

Jumpcut is an application that provides “clipboard buffering” — that is, access to text that you’ve cut or copied, even if you’ve subsequently cut or copied something else. The goal of Jumpcut’s interface is to provide quick, natural, intuitive access to your clipboard’s history.

Tags: mac practical
Link

Like it would be hard to log “We are actually caching this response.”.
So next time you see that message in your apache log it really is double negation and your it has been cached.

Photo
Zyxel WiFi connectivity problem solved.Finally our Zyxel P-2602HW-D1A started serving WiFi as it should.On picture you see screen that fixed it.

Zyxel WiFi connectivity problem solved.
Finally our Zyxel P-2602HW-D1A started serving WiFi as it should.
On picture you see screen that fixed it.

Tags: practical
Text

Google Chrome on Linux

If you want to run this very nice browser don’t go for lunchpad option.
You’ll better subscribe to this dev-channel.

Photo
Interface design
 While designing API make sure to take special care of how users of API can communicate errors back to you.
In general it’s a #fail to provide user with multiple options of communicating failure to you.For example I made it possible to user to return false or throw exception to say something went wrong.Week after I wrote it I got confused by this code.

Interface design


While designing API make sure to take special care of how users of API can communicate errors back to you.

In general it’s a #fail to provide user with multiple options of communicating failure to you.
For example I made it possible to user to return false or throw exception to say something went wrong.
Week after I wrote it I got confused by this code.

Text

asserting it right

assertTrue(integer == 4);

Why would you write this?
Much better is to do:

assertEquals("Meaning of this number", 4, integer);

That way you didn’t wrote much more than before, but when this test fails people know what failed.