Skip to content

Instantly share code, notes, and snippets.

@matsjoyce
matsjoyce / Optimiser.js
Last active August 29, 2015 14:07
Adjustments to Optimiser
words = read("wordlist").split("\n")
keyboard = {
x: {},
y: ['q w e r t y u i o p', ' a s d f g h j k l', ' z x c v b n m'],
};
for (var i in keyboard.y)
for (var y of keyboard.y[i])
keyboard.x[y] = +i*4;
p = C => (x=keyboard.x[C],{x, y: keyboard.y[x/4].indexOf(C)})
@matsjoyce
matsjoyce / tag.gif
Last active November 7, 2017 19:27
The new SO tags!
tag.gif
@matsjoyce
matsjoyce / files.py
Created April 2, 2015 09:39
Result of Override a “private” method in a python module
# module.py
def _cmd(command, args):
# do something nasty
print(command, args)
def function_to_be_tested():
# do cool things
_cmd('rm', '-rf /')
return 1

Well, evaluation of decorators does start at the last, but that is during definition time, not execution time. If you have the following code:

def decor_1(func):
    print("Decor 1")
    def wrap_1(*args, **kwargs):
        print("Wrap 1")
        return func(*args, **kwargs)
    return wrap_1
@matsjoyce
matsjoyce / edukit1.py
Last active September 13, 2017 17:01
# edukit1.py - A wrapper around RPi.GPIO setup to make CamJam EduKit 1 look nicer
# Copyright (C) 2017 Matthew Joyce matsjoyce@gmail.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of

Full CI integration for Git

Starting Configuration

Servers

  • Bitbucket: We shall use the URL http://BITBUCKET to refer to this server which shall have a project named http://BITBUCKET/projects/PROJECT_KEY/repos/REPOSITORY. This repo will have a folder containing the testing code named jenkins_scripts.
  • Jenkins: We shall use the URL http://JENKINS to refer to this server

Using the Build System

The following instructions are given using the command line. Equivalent steps can be carried out in many grahical tools, but are given in the command line format to cover all use cases.

Branching

This process describes the branching of a 1.10 branch, with development continuing on a 1.11 branch. Change the numbers as needed.

First, create a release branch: