App Sales and Hourly Earnings Calculated

Interested in some data about app sales? I wrote a Ruby script which parsed my worklog files for timestamps, calculate the difference, add it up and then return in a human-readable form the amount of time it took to develop Calendar Paste. So I logged about 115 hours of active development time, planning, tinkering with the website and whatnot—and I definitely spent more hours on this project before I began logging my progress.

Continue reading …

Parsing YAML Frontmatter in Ruby

I was trying to fix a non-issue with YAML by throwing Ruby gems at it. nanoc and Jekyll and the like provide YAML metadata for their content files: Google said this is called YAML Frontmatter. So I was looking at a way to parse YAML Frontmatter of plain text files, searching for gems – until I found the laconic answer on StackOverflow: what’s wrong with YAML’s standard features?

Continue reading …

Nanoc3 Boilerplate

I put my personal nanoc boilerplate setup on GitHub. Maybe you find the deployment process useful.

Deployment Process

I assume you’re public html folder is called htdocs/ and you can create new folders below your domains folder but outside htdocs/.

I also assume you use my Rakefile: upon rake build it will checkout the branch ‘deploy’ and put all files from output/ in there. Uploading from ‘deploy’ to the production server will only copy the HTML output, not the nanoc setup.

  1. Initialize bare production git repository on the server:

    git init --bare ~/doms/example.com/git
    
  2. You’ll want automatic updates when you push to the server. Use git’s own
    post-receive hook:

    # add to ~/doms/example.com/git/hooks/post-receive
    echo "Updating website ..."
    cd /the/full/path/to/doms/example.com/htdocs || exit
    unset GIT_DIR
    git pull origin 
    echo "Update complete."
    

    Make it executable:

    chmod +x post-receive
    
  3. Initialize git repository in htdocs/. This will point to the bare
    repository on the server and check out the current version:

    # given you're in ~/doms/example.com/htdocs
    git init
    git remote add origin ../git
        
    # setup branch to pull from:
    git config branch.master.remote origin
    git config branch.master.merge refs/heads/deploy
    
  4. Setup production server locally:

    git remote add production ssh://user@example.com/~/doms/example.com/git/
    git remote show production
    
  5. Commit changes locally and put them on the server:

    git commit
    rake build
    git push production deploy
    

    You can push all branches via git push production to backup your code.
    Only the branch ‘deploy’ will be visible to the public.

Sources

I once combed this together from various sources:

Link Love: practicallyefficient.com

Eddie stumbled upon Calendar Paste first!

I think about publishing sales stats on my website; maybe this would be a cool add-on for the upcoming e-book as well. I already sold the app 12 times in the past few days without any marketing whatsoever. I’m curious where I’m heading with this niche app.

Also, I got some cool feedback and suggestions! However this is going to turn out financially: It will be a fun ride, that’s for sure.

Thank you, dear early adopters!