Skip to content

Instantly share code, notes, and snippets.

View jesperronn's full-sized avatar

Jesper Rønn-Jensen jesperronn

View GitHub Profile
@jesperronn
jesperronn / env.rb
Created September 22, 2010 20:22 — forked from suhrawardi/env.rb
$: << File.expand_path(File.dirname(__FILE__) + "/../support")
#$DEBUG = true
$ROOT_PATH = File.expand_path(File.dirname(__FILE__))
require 'capybara'
require 'capybara/cucumber'
require 'spec'
@jesperronn
jesperronn / unicorn_example.sh
Created June 13, 2012 20:33 — forked from tualatrix/unicorn_example.sh
An example of unicorn init script for Ubuntu
#!/bin/sh
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the unicorn web server
# Description: starts unicorn
@jesperronn
jesperronn / unicorn.rb
Created June 13, 2012 20:48 — forked from tobiashm/unicorn.rb
unicorn startup/management script (to work from capistrano)
# ------------------------------------------------------------------------------
# Sample rails 3 config
# ------------------------------------------------------------------------------
# Set your full path to application.
app_path = "/srv/www/xxx/current"
# Set unicorn options
worker_processes 2
preload_app true
@jesperronn
jesperronn / unicorn
Created June 14, 2012 20:01
/etc/init.d script for unicorn
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
@jesperronn
jesperronn / unicorn
Created June 14, 2012 20:01
/etc/init.d script for unicorn
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
@jesperronn
jesperronn / etc-init.d-unicorn.sh
Created June 14, 2012 20:17 — forked from matiaskorhonen/gist:420880
Unicorn /etc/init.d/unicorn script
#!/bin/bash
### BEGIN INIT INFO
# Provides: Unicorn
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 3 5
# Default-Stop: 0 1 2 4 6
# Short-Description: Start unicorn web server at boot - port 3000
# Description: Enable cancerventetid application at boot time. Start the unicorn web server (port 3000)
### END INIT INFO
@jesperronn
jesperronn / instructions.txt
Created October 16, 2012 11:36 — forked from natritmeyer/instructions.txt
Cucumber formatter to list all tags
To list all tags scattered across your feature files...
1) add the following "list_tags.rb" file to your features/support directory
2) cucumber -d -f Cucumber::Formatter::ListTags
The output now has both tags and number of occurrences:
@backend-required 4
@issues 1
@localstub 1
<div id="remote">
<input class="typeahead" type="text" placeholder="Oscar winners for Best Picture">
</div>
@jesperronn
jesperronn / docx2md.md
Last active November 21, 2023 12:49 — forked from aembleton/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@jesperronn
jesperronn / Capfile
Created January 26, 2016 11:43 — forked from troelskn/Capfile
Sample cap setup
# Load DSL and set up stages
require 'capistrano/setup'
# Include default deployment tasks
require 'capistrano/deploy'
# Include tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
#