Skip to content

Instantly share code, notes, and snippets.

@bvanderlaan
bvanderlaan / matchingSocks.md
Last active October 12, 2018 13:50
Matching Socks

Matching Socks

This Kata is as follows: If I give you a collection where each entry in the collection is a sock and a sock has a side (right or left) write a function which will produce a new collection of pairs.

That is given this:

{
  "socks": [
    { "side": "left" }, 
    { "side": "right" }, 
@bvanderlaan
bvanderlaan / mochaInCoderPad.md
Created September 6, 2018 00:25
How to run Mocha in CoderPad

When using CoderPad to write code in the browser, say your on the go and just need to write some code, and that code happens to be JavaScript and you want to run a Mocha test here is what you need to do:

'use strict';

const { expect } = require('chai');
const Mocha = require('mocha');
const mocha = new Mocha({ui: 'bdd'});

// CODE ///////////////
@bvanderlaan
bvanderlaan / createSVNAuthorTransform.py
Last active August 11, 2018 04:36
svn-to-git-migration-tools
# Copyright 2016 Brad van der Laan
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@bvanderlaan
bvanderlaan / CONTRIBUTING.md
Last active August 4, 2018 02:02
CONTRIBUTING

Contributing to <insert project name here>

First Thanks for helping out 👍🎉 we really appreciate it 🎉👍

The following is a set of guidelines for contributing to the project. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

Pull Requests

All Pull Requests are welcome but to ensure they get committed please make sure you include the following in your PR:

  • Brief description of the issue
  • Results from the automated tests
@bvanderlaan
bvanderlaan / gameoflife.js
Created January 2, 2018 03:18
Here is my implementation of Conway's game of life which I banged out while between flights
'use strict';
const { expect } = require('chai');
// GAME ///////////////////////////////////
class Cell {
constructor(alive = true) {
this.isAlive = alive;
}
@bvanderlaan
bvanderlaan / VSCodeSettings.md
Last active December 30, 2017 00:46
My VS Code Settings

I use VS Code across a few machines, to make sure my settings are the same on each I'm posting them here. If your not me but find this useful then 👍

// Place your settings in this file to overwrite the default settings
{
    "files.associations" : {
        "*.ejs" : "html"
    },
    "files.insertFinalNewline": true,
@bvanderlaan
bvanderlaan / myDotFiles.md
Last active April 5, 2020 13:34
My dot Files

Just thought I'd drop this somewhere I can get at it if I need to redo my machine. For my terminal's PS1 I tend to do this:

parse_git_branch() {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}

rightprompt() {
 printf "\[\033[91m\]||< max-length\[\033[00m\]"
}