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 / 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 / releasenotes
Last active November 17, 2022 06:07
releasenotes script (with git)
#!/usr/bin/ruby
#
# release notes script
# takes two git tags and prints any changes between them
#
# usage:
# ./releasenotes.sh [from] [to] [releasename]
#
# with [from] and [to] being git tags
@jesperronn
jesperronn / kickoff-2022-løsning-commodore-64.bas
Last active September 26, 2022 06:13
kick off 2022 Barcelona, Løsning commodore 64 opgave
1 REM Kick-off 2022 test løsningen. Opgaven gik ud på at udskrive teksten
2 REM "KICKOFF 2022 BARCELONA" på skærmen på en Commodore 64
3 REM
4 REM
5 REM **** COMMODORE 64 BASIC V2 ****
6 REM 64K RAM SYSTEM 38911 BASIC BYTES FREE
7 REM
8 REM READY.
9 REM
10 PRINT "KICKOFF 2022 BARCELONA"
@jesperronn
jesperronn / git-general-setup.sh
Last active May 4, 2021 13:27
Git generel opsætning/config som gør din hverdag lettere
# Fra Nine Speed Session Git Kommandolinje presentation 2021-05-04
#
# Flere af disse kan findes i mine dotfiles
# https://github.com/jesperronn/cowboy-dotfiles/blob/master/link/.gitconfig
# benyt git push -u for at oprette branches
git config --global push.default current
@jesperronn
jesperronn / git-global-config.sh
Last active November 28, 2020 05:04
Standard Git Config global options
#!/bin/bash
# Standard shortcuts for my usual git configuration
#
# http://www.arthurkoziel.com/2008/05/02/git-configuration/
#
#
# SVN-like shortcuts for often used commands:
git config --global alias.st status -bs
@jesperronn
jesperronn / Gemfile
Created November 28, 2012 11:21
HS code scraper
source 'https://rubygems.org'
gem "nokogiri"
SimpleCov.coverage_dir('tmp/coverage')
# save to CircleCI's artifacts directory if we're on CircleCI
# see https://circleci.com/docs/code-coverage
if ENV['CIRCLE_ARTIFACTS']
dir = File.join(ENV['CIRCLE_ARTIFACTS'], 'coverage')
SimpleCov.coverage_dir(dir)
end
require 'simplecov-csv'
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 http://www.iamatechie.com/remove-all-svn-folders-in-windows-xp-vista/
;
; Enrichened with comments by Jesper Rønn-Jensen ( http://justaddwater.dk/ )
;
// example Jenkinsfile with the following features
//
// * parallel build
// * Slack notifications
// * Clickable links to relevant commits and healthcheck urls
// * Multisite deployments
def git_host = "https://github.com/company/project_name"
def host = [
integration: [
@jesperronn
jesperronn / Howto convert a PFX to a seperate .key & .crt file
Created April 15, 2016 12:46 — forked from TemporaryJam/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
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]`