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 /
Last active Oct 23, 2019 — forked from aembleton/
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 / Gemfile
Created Nov 28, 2012
HS code scraper
View Gemfile
source ''
gem "nokogiri"
View .simplecov
# save to CircleCI's artifacts directory if we're on CircleCI
# see
dir = File.join(ENV['CIRCLE_ARTIFACTS'], 'coverage')
require 'simplecov-csv'
View delete_svn_subfolders.reg
Windows Registry Editor Version 5.00
; Running this file will give you an extra context menu item in Windows Explorer
; "Delete SVN folders"
; For the selected folder, it will remove all subfolders named ".svn" and their content
; Tip from
; Enrichened with comments by Jesper Rønn-Jensen ( )
View Jenkinsfile
// example Jenkinsfile with the following features
// * parallel build
// * Slack notifications
// * Clickable links to relevant commits and healthcheck urls
// * Multisite deployments
def git_host = ""
def host = [
integration: [
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
`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]`
View pre-commit.bat
REM Subversion pre-commit hook for Windows machine
REM put this in your SVN repository folder /hooks/pre-commit.bat
REM we use it with svn version
@echo off
:: Stops commits that have empty log messages.
@echo off
jesperronn /
Created Dec 11, 2017 — forked from rxin/
ramdisk create/delete on Mac OS X.
# From
if [ $# -ne $ARGS ] # correct number of arguments to the script;
jesperronn /
Created Feb 19, 2017
reformat json: read filename and write it again in the same name
# reformat json: read filename and write it again in the same name
# read JSON file and save it again reformatted
# usage:
# `reformat my.json`
node -e "
var fs = require('fs')
# Your init script
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
# An example hack to make opened Markdown files always be soft wrapped:
# path = require 'path'
You can’t perform that action at this time.