Skip to content

Instantly share code, notes, and snippets.

Jesper Rønn-Jensen jesperronn

Block or report user

Report or block jesperronn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jesperronn
jesperronn / ramdisk.sh
Created Dec 11, 2017 — forked from rxin/ramdisk.sh
ramdisk create/delete on Mac OS X.
View ramdisk.sh
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then
@jesperronn
jesperronn / Howto convert a PFX to a seperate .key & .crt file How to convert a .pfx SSL certificate to .crt/key (pem) formats. Useful for NGINX
View Howto convert a PFX to a seperate .key & .crt file
source: http://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/
`openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]`
What this command does is extract the private key from the .pfx file. Once entered you need to type in the importpassword of the .pfx file. This is the password that you used to protect your keypair when you created your .pfx file. If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to import it again, anywhere!. Once you entered the import password OpenSSL requests you to type in another password, twice!. This new password will protect your .key file.
Now let’s extract the certificate:
`openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]`
@jesperronn
jesperronn / loading_spinner.coffee
Last active Feb 3, 2016 — forked from cpuguy83/loading_spinner.coffee
Simple loading spinner for long requests with turbolinks and bootstrap modal. This fork: HTML for Bootstrap 3.3.x
View loading_spinner.coffee
@PageSpinner =
spin: (ms=500)->
@spinner = setTimeout( (=> @add_spinner()), ms)
$(document).on 'page:change', =>
@remove_spinner()
spinner_html: '
<div class="modal hide fade" id="page-spinner" role="dialog">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
@jesperronn
jesperronn / Capfile
Created Jan 26, 2016 — forked from troelskn/Capfile
Sample cap setup
View Capfile
# 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:
#
@jesperronn
jesperronn / docx2md.md
Last active Oct 23, 2019 — forked from aembleton/docx2md.md
Convert a Word Document into MD
View docx2md.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

View remote.html
<div id="remote">
<input class="typeahead" type="text" placeholder="Oscar winners for Best Picture">
</div>
@jesperronn
jesperronn / instructions.txt
Created Oct 16, 2012 — forked from natritmeyer/instructions.txt
Cucumber formatter to list all tags
View instructions.txt
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
@jesperronn
jesperronn / etc-init.d-unicorn.sh
Created Jun 14, 2012 — forked from matiaskorhonen/gist:420880
Unicorn /etc/init.d/unicorn script
View etc-init.d-unicorn.sh
#!/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 / unicorn
Created Jun 14, 2012
/etc/init.d script for unicorn
View 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 Jun 14, 2012
/etc/init.d script for unicorn
View 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
##
You can’t perform that action at this time.