Faster setup of virtualenv with devpi

Setting up the virtualenv can take a significant amount of time because it pulls down packages from PyPI. I was surprised that it does not try to use the locally installed packages. One way to speed up the rebuild is to use a local caching mirror of PyPI. This can be accomplished by using devpi.

Step 1: Install devpi package

sudo pip install devpi

Step 2: Add the following lines in your /root/.pip/pip.conf file

[global]
index-url  = http://localhost:3141/root/pypi/+simple/
extra-index-url  = https://pypi.python.org/simple/

From now on, pip will first try to get the package from devpi-server running on your localhost first and if you do not have devpi-server running, will fallback to pypi.python.org .

Step 3: Start the devpi-server on your localhost: devpi-server. Try installing a few packages or build a virtualenv. The command devpi-server -start will start the server and put it in background.

TODO - figure out how to start this from init.



gaslighting

In 1938, a London stage play told the story of a husband who drove his wife insane. In order to convince the wife that her own brain had become an unreliable narrator, the husband dimmed the gaslights in their home and told the wife she imagined the change. The play gave rise to the term “gaslighting,” : "a form of psychological abuse in which false information is presented to the victim with the intent of making him/her doubt his/her own memory and perception". The name of the play was Gas Light

They’re our servants, tools

"You can see that our real problem is another thing entirely. The machines only do figuring for us in a few minutes that eventually we could do for our own selves. They’re our servants, tools. Not some sort of gods in a temple which we go and pray to. Not oracles who can see into the future for us. They don’t see into the future. They only make statistical predictions—not prophecies. There’s a big difference there, but Reinhart doesn’t understand it. Reinhart and his kind have made such things as the SRB machines into gods. But I have no gods. At least, not any I can see."

The Variable Man, by Philip K. Dick

Defined tags for this entry: , , ,

note to self - emergent behavior

An emergent behavior or emergent property can appear when a number of simple entities (agents) operate in an environment, forming more complex behaviors as a collective. How does it apply to distributed systems?

creating org-mode TODOs from wanderlust emails

If you are one of those five people in the world who use Emacs' wanderlust for email and org-mode, then you might find this tip useful. To create TODO items from emails, use the org-capture template. Below is the template that I use

(setq org-capture-templates '(("t" "Todo" entry
                              (file+headline "~/org/mygtd.org" "Tasks")
  " TODO %^{Brief Description} %^g\n%?\nAdded: %U" :prepend t)
                             ("j" "Journal" entry
  (file+headline "~/dump/journal.org" "")
  "\n %^{topic} %T \n%i%?\n" :prepend t)
                             ("e" "Email Todo" entry
                              (file+headline "~/org/mygtd.org" "Tasks")
                              "* TODO %^{Brief Description}\n%a\n%?Added: %U\n" :prepend t)
      ))

When you are reading an email and you want to create a TODO item from it, just do M-x org-capture and select the Email Todo (e).


gitosis hint: does not appear to be a git repository

You have successfully installed gitosis, and you have been able to add users into gitosis. Now, on a remote computer, you try to checkout.

tearlayneed-lm:tmp rshekhar$ git clone ssh://stormcrow@home:221/gitosis-admin
Cloning into gitosis-admin...
fatal: '/gitosis-admin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
I am running the ssh server on port 221 and my username is stormcrow. If your reaction is WTF!, then I can sympathise with you. The correct clone command is
git clone ssh://stormcrow@home:221/~/gitosis-admin
Cloning into gitosis-admin...
remote: Counting objects: 24, done.
If you failed to notice, there is a ~ required.


Page 3 of 18, totaling 123 entries