Skip to content

Instantly share code, notes, and snippets.

View joejag's full-sized avatar

Joe Wright joejag

View GitHub Profile
@joejag
joejag / watch.sh
Created April 22, 2020 10:04
Run with ./watch.sh <your normal command>
#!/bin/bash
while true; do
clear
date
$*
sleep 2
done
@joejag
joejag / BowlingStreams.java
Created April 16, 2020 21:22
Bowling kata using streams
package bowls;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
public class BowlingStreams {
@joejag
joejag / novel.md
Created March 23, 2020 20:24
Innovation and Learning team
================================================================================
["1871-72", "1872-73", "1873-74"] Wanderers 4
["1872-73", "1873-74", "1874-75"] Wanderers 2
["1873-74", "1874-75", "1875-76"] Oxford University 2
["1874-75", "1875-76", "1876-77"] Wanderers 4
["1875-76", "1876-77", "1877-78"] Wanderers 6
["1876-77", "1877-78", "1878-79"] Wanderers 4
["1877-78", "1878-79", "1879-80"] Wanderers 2
["1878-79", "1879-80", "1880-81"] Old Etonians 2
["1879-80", "1880-81", "1881-82"] Clapham Rovers 2
@joejag
joejag / scores.txt
Last active February 24, 2020 23:27
Best football scoring from MNF
European cup: 5
league: 4
other euro (uefa/cup winners cup): 3
fa cup: 2
league cup: 1
other win (uefa super cup/club world cup): 1
european cup runner up: 2
league runner up: 1
@joejag
joejag / urnfield.ps1
Last active February 8, 2020 02:06
Unrfield numbers in powershell, using Pester as the testing framework. Problem: https://code.joejag.com/coding-dojo/converting-between-different-numeral-systems/
function urnfield {
Param([Parameter(Mandatory = $True)] $amount)
$ones = $amount % 5
$fives = [math]::floor($amount / 5)
'/' * $ones + '\' * $fives
}
It 'handles numbers less than 5' {
urnfield 1 | Should -Be '/'
urnfield 2 | Should -Be '//'
@joejag
joejag / gist:4732540a176d17288e8bc246d96da499
Last active January 15, 2022 19:38
Lower back pain exercises
Video: https://www.youtube.com/watch?v=1Yq_yehKReo
https://www.nhs.uk/live-well/exercise/lower-back-pain-exercises/
https://www.youtube.com/watch?v=20zybMbnVoU
Bottom to heels stretch:
https://www.youtube.com/watch?v=20VUKqEyRiA
Knee Rolling:
@joejag
joejag / ideas.md
Last active February 3, 2020 11:17
Book ideas
DECLARE SUB GOTO_60()
DECLARE SUB GOTO_240()
DECLARE SUB GOTO_350()
DECLARE SUB GOTO_360()
DECLARE SUB GOTO_380()
DECLARE SUB GOTO_400()
DECLARE SUB GOTO_420()
DECLARE SUB GOTO_470()
DECLARE SUB GOTO_520()
@joejag
joejag / interviews.md
Last active February 7, 2020 13:54
Interview research