This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# tag grabber from: https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c | |
# original install instructions https://docs.docker.com/compose/install/ | |
latest_tag=`curl --silent "https://api.github.com/repos/docker/compose/releases/latest"|grep '"tag_name":'|sed -E 's/.*"([^"]+)".*/\1/'` | |
target=~/Documents/programs/bin/docker-compose | |
curl -L "https://github.com/docker/compose/releases/download/$latest_tag/docker-compose-$(uname -s)-$(uname -m)" -o $target | |
chmod +x $target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# erd for https://github.com/DFE-Digital/early-careers-framework/ | |
# view: https://dreampuf.github.io/GraphvizOnline/?url=https://gist.githubusercontent.com/timabell/d12c9cde5f88ef618d03d7aacb84b7e7/raw/f2e4105632d8612484058b6366679cdc851f89ee/entity-relationship-diagram.dot | |
# dot source: https://gist.github.com/timabell/d12c9cde5f88ef618d03d7aacb84b7e7 | |
# to regenerate this: | |
# - checkout branch `entity-relationship-diagram-outputs` | |
# - rebase on `develop` | |
# - `bundle` | |
# - `bundle exec erd --filetype=dot` | |
# - upload `tmp/entity-relationship-diagram.dot` to gist | |
# - link to gist with `https://dreampuf.github.io/GraphvizOnline/?url=`+your url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Clear older photos and videos of android phone. | |
# Combined with https://syncthing.net/ | |
# Howto: | |
# | |
# *Warning* make sure you have good backups and multiple copies of things first! | |
# | |
# 1) Install synthing on the phone and a laptop. Configure sync of at least DCIM folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "json" | |
require "pry" | |
def load_json filename | |
puts "parsing #{filename} ..." | |
file = File.read filename | |
json = JSON.load file | |
puts "#{json.length} records loaded" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
out.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://gist.github.com/timabell/26716d7773b61d7b586c5a1babe8fb28 | |
# make a picture in picture video from multiple front/back camera chunked video files | |
# expects files in folders `front/` and `back/` | |
mkdir -p output | |
# front | |
# concat file chunks together https://trac.ffmpeg.org/wiki/Concatenate | |
ls front/*.MP4 | awk '{print "file " "'\''" $0 "'\''"}' | tee front-files.txt | |
ffmpeg -f concat -i front-files.txt -c copy -flags +global_header -acodec libvo_aacenc output/front.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq.Expressions; | |
using Microsoft.Extensions.Logging; | |
using Moq; | |
using Moq.Language.Flow; | |
namespace YourProject.Unit.Tests | |
{ | |
internal static class MockHelper | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"resourceEnvironmentName": { | |
"value": "" | |
}, | |
"customHostName": { | |
"value": "" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"containerName": { | |
"value": "s121d01-schema-explorer-test" | |
}, | |
"location": { | |
"value": "westeurope" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -v | |
# local version of: | |
# http://deckdown.org/deck?theme=solarized&src=https://gist.githubusercontent.com/timabell/55ebbab29ea123c17f192bdbdec5aa44/raw/whats-a-db.md#/2 | |
pushd . | |
cd ~/repo/deckdown | |
PORT=3002 node deckdown.js & | |
pid[0]=$! | |
popd |