Protect Your git Repository’s .htpasswd
Update 2: WebFaction fixed their installer. You still need to fix this yourself if the repository was created before Jan 13, 2011. (Details here.)
Update: Git repositories created with WebFaction’s git installer are insecure, even when they’re password protected. Some Apache installations are configured out-of-the-box to protect .htpasswd files. That is not the case with WebFaction.
If you’re running a .git repository on WebFaction that was created by following their documentation, then you must:
- Remove the file’s default world-readable permissions, by running chmod o-r .htpasswd
- OR: Prevent the file from being downloaded, by adding the following to .htaccess:
<files ~ "^\.ht"> Order allow,deny Deny from all </files>
Of course, the same applies to any .htpasswd file.
AskJeevesMom.com
You can now access this blog (NatanYellin.com) via AskJeevesMom.com
This is because:
- The phrase “Ask Jeeves’ Mom” is easier to remember than my own name, Natan Yellin. The redirect might be useful for exchanging contact information… Then again, maybe not
- I have plans for a new search engine, capable of answering questions that befuddle existing search technology. If you’d like to get involved, email me for details. For starters, we’ll need a proper logo. UPDATE: Please include the words Ask Jeeves’ Mom in the email’s title. (If you already contacted me then you’re fine.)
And happy new year. My new year’s resolution is to pursue more spur-of-the-moment ideas to their end. Ask Jeeves Mom is a trifle, but more interesting projects are in the works.
bad interpreter: No such file or directory
Earlier today I was trying to run a Python script that I downloaded from the internet. Bash (or the kernel, to be exact) refused to run the script, insisting that python didn’t exist:
$ mem.py -bash: /home/natan/bin/mem.py: /usr/local/bin/python2.5^M: bad interpreter: No such file or directory
The script agreed to run indirectly with python ~/bin/mem.py
I googled and discovered that the file was encoded in DOS format with improper line endings.
To fix the problem, I copied the contents of the file and pasted them into a new file. Voilà. The shebang became magical again.
Then again, you can also fix the problem permanently. (Don’t.)
ln -s sh "sh$(printf "\r")"
photo credit: Sven & Lirion
Snowy Database Schema
For GCI (Google Code In) I’m working on Snowy, the Django-based application to view and synchronize Tomboy notes online. My task is to add support for multiple OpenID accounts.
To get started, I used django_extensions to generate a graph of the database schema.
Lessons Learned from Writing a One-Month Novel
I’m trying to write a novel this month. It has been a wild experience. The things I’ve had to research, would make even the FBI gasp at my search history. Here are a few things I’ve learned along the way:
Typos Are God’s Gift to Writers
A few nights ago, I was writing about an ant colony and accidentally wrote the following:
The aunts were furious. Inside the aunt colony…
I noticed my mistake and was about to correct the sentence. Then I stopped myself. What if there really was an auntcolony? I thought. I kept on writing, and soon the following was born:
In the aunthole, three egg timers all chimed at once. It was nursing time. The aunts climbed off their sofas and waddled over to three different holes, set around the room. They peeked down into the lower chamber. It was a huge cavern, larger than a football stadium. Lamps lit the edges, casting a golden glow on the center of the cavern. The cavern was filled with rows upon rows of pink baby cradles. Inside each cradle, a baby aunt slept. The day was coming. Soon the baby aunts would be ready to leave their cradles, put on their pink dresses, and lay upon their sofas.


20 year old