veni vidi Scripsi

How I Recovered from a Corrupt Git Repository

How my Git repository got corrupt in the first place

Ok, so how my Git repository got corrupt was (sort of) entirely my own fault. And why it was a problem was definitely entirely my own fault.

I had two stashes in my repository and decided for no apparent reason to pop the second stash straight after popping the first stash. Git told me there were conflicts in the second pop. I decided that I shouldn't really have popped them straight after each other (lesson #1 here) and decided to restore a Time Machine backup to get to the state where both stashes were still stashed. And that's continue.

Upgrading the Mac from Snow Leopard / Lion to Mavericks

In October 2013 I upgraded both my work Mac running Lion and my home Mac running Snow Leopard to Mavericks. Here's a report of the problems I ran into.

Installing & Running Plone 4.3 on Mac OS X Mavericks

So, I'm finally getting to know Plone. We will be using it for the company website and I should be getting a short training in working and developing with Plone so I can take on the main­te­nance of the website after delivery.

I had some extra time to delve into Plone before the training and I have to say: Plone definitely has a steep learning curve. It toke me forever just to get it up and running (not being familiar with zc.buildout doesn't help). Just now I had to help my colleague getting everything up and running and he ran into continue.

Mac OS X Apache Mass VHosts (with support for htaccess and symlinks)

A while ago I wrote two posts, one on using Twig and another on using htaccess with Mac's Apache. I was reasonably happy with the described setups until I discovered that when I used something like <link rel="stylesheet" href="/style.css" media="all"> in my HTML it wouldn't work because my site was running at the default http://localhost/~heleen/website/index.html and so it would map the 'root' slash to http://localhost/ rather than http://localhost/~heleen/website/. I found a solution to this using vhosts, which works really well. But then I had to add another website, and another, and realised that surely there should be an easier way continue.

Getting htaccess to work on a Mac (Lion) with Apache and using symlinks

Edit (sudo) /etc/apache2/users/[your-username].conf:

  1. Add Doc­u­men­t­Root "/Users/[your-username]/Sites/" at the top of the file;
  2. Add Fol­lowSym­Links to the Options;
  3. Change Al­lowOver­ride None to Al­lowOver­ride All;
  4. Change Deny from All to Allow from All.

Original:

<Directory "/Users/[your-username]/Sites/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Deny from All
</Directory>

New:

DocumentRoot "/Users/[your-username]/Sites/"
<Directory "/Users/[your-username]/Sites/">
   Options Indexes MultiViews FollowSymLinks
   AllowOverride All
   Order allow,deny
   Allow from All
</Directory>

Restart Apache: sudo apachectl graceful

Resources

Installing Gettext on Mac OS X Lion

Just now I tried to use django-admin.py makemes­sages to create a language file and got the following error: /bin/sh: xgettext: command not found. After a search on my system it turns out I don't have gettext installed.

I did some searching and found mac-ports solutions, but I'm not a big fan of them. I tried compiling myself and got the following errors:

stpncpy.c:34: error: expected declaration specifiers or ‘…’ before numeric constant
stpncpy.c:34: error:    expected ‘)’ before ‘!=’ token

stpncpy.c:34: error: expected ‘)’ before ‘?’ token

make[3]: *** [stpncpy.lo] Error 1

make[2]: *** [install] Error 2

make[1]: *** [install-recursive] Error 1

make: *** [install-recursive] Error 1

I continue.

Quick Templating System for HTML Page Mock-ups (Mac OS X specific)

For the project I am currently working on at my job I needed to make some HTML page mock-ups. The HTML and CSS were already available within the current version of the website, I just needed to re­struc­ture the content a bit and make a few mock-ups of it to see what sort of issues we'd run into.

Initially I just copied the HTML and replaced the old content with the new content. Then I made another copy and replaced it with different content. I then realised what I needed was a tempting system. If I was going to make 10 continue.