Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Jira Timeline
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Add a timeline visualisation to jira filters
// @author You
// @match https://jira.tools.tax.service.gov.uk/issues/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=service.gov.uk
// @grant none
// ==/UserScript==
#!/bin/zsh
repos=(
self-employed-income-support
self-employed-income-support-admin-frontend
self-employed-income-support-check-frontend
self-employed-income-support-eligibility
self-employed-income-support-frontend
self-employed-income-support-stub
self-employed-income-support-journey-tests
@JoeSimmonds
JoeSimmonds / StreamUtils.js
Created April 6, 2018 13:43
Streams and Promises
const {Writable, Readable, Transform} = require('stream');
class PromiseStream extends Readable {
constructor(options) {
super(Object.assign({objectMode:true, options}));
this.draining = false;
this.promiseCount = 0;
}
handleCompletion(x) {
using System;
namespace ConsoleApplication
{
delegate int Op (int a);
delegate int TwoOp (int a, int b);
delegate Op CurriedOp (int a);
class OpCurryer {
private TwoOp f;
@JoeSimmonds
JoeSimmonds / Href anything
Created September 17, 2013 13:50
make any element into a link by adding a href attribute
$(document).ready(function(){
$(":not(A)[href]").css("cursor","pointer")
.click(function(evt){window.location = $(this).attr("href");evt.stopPropagation();});
});
@JoeSimmonds
JoeSimmonds / prompt.ps1
Created October 18, 2011 09:53
Powershell prompt script
function prompt {
write-host;
get-location | write-host;
if (isCurrentDirectoryGitRepository) {
$status = gitStatus
Write-Host('[') -nonewline -foregroundcolor Yellow
write-host $status["branch"] -nonewline -foregroundcolor Yellow;
if ($status["remote"] -ne ""){
if ($status["behind"] -ne 0){