Jesper Rønn-Jensen jesperronn
-
Nine A/S
- Copenhagen, Denmark
- http://justaddwater.dk/
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 = "https://github.com/company/project_name" | |
def host = [ | |
integration: [ |
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 |
View json-reformat.sh
#!/usr/bin/env/bash | |
# reformat json: read filename and write it again in the same name | |
# | |
# read JSON file and save it again reformatted | |
# | |
# usage: | |
# `reformat my.json` | |
reformat(){ | |
node -e " | |
var fs = require('fs') |
View install_nginx_rhel.sh
#!/bin/bash | |
FILE=/etc/yum.repos.d/nginx.repo | |
sudo touch $FILE | |
sudo chown root:root $FILE | |
echo " | |
[nginx] | |
name=nginx repo | |
baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/ |
View Gemfile
# add this line to your `Gemfile`: | |
gem 'sucker_punch' |
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]` |
View npm-shrinkwrap.json
{ | |
"name": "angular2-webpack-starter", | |
"version": "3.0.0", | |
"dependencies": { | |
"abbrev": { | |
"version": "1.0.7", | |
"from": "abbrev@>=1.0.0 <1.1.0", | |
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz" | |
}, | |
"accepts": { |
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"> |
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: | |
# |
View js_toggle.coffee
# Generic checkbox toggle select all/none functionality. | |
# | |
# | |
# Given the following checkbox: | |
# <input type="checkbox" class="js-toggle-all" | |
# data-target=".approved-count" | |
# data-count="#counter" | |
# data-total="#total"> | |
# | |
# This checkbox kan toggle and count based on the selection of other checkboxes. |
NewerOlder