Skip to content

Instantly share code, notes, and snippets.

View michael-k's full-sized avatar

Michael K. michael-k

  • North Ayrshire, Scotland
View GitHub Profile
@michael-k
michael-k / git-lfs-diff.sh
Created June 26, 2015 10:22
Git LFS Diff
#!/bin/sh
if [ $# -ne 3 ] ; then
echo "Usage: $0 <ref> <ref> <filename>"
exit 1
fi
RevA=$1
RevB=$2
File=$3
@michael-k
michael-k / Dockerfile
Created March 7, 2017 18:22 — forked from mixja/Dockerfile
Docker Health Check using Make
FROM nginx
HEALTHCHECK --interval=3s --retries=20 CMD curl -fs http://localhost:${HTTP_PORT:-8000}
@michael-k
michael-k / git-unsorted-log.go
Last active May 19, 2021 17:14 — forked from timhughes/git-unsorted-log.go
An example of howto use git2go (https://github.com/libgit2/git2go) which is a libgit2 (https://libgit2.github.com/) bindings package for golang.
/*
requires libgit2
*/
package main
import (
"github.com/libgit2/git2go"
"fmt"
@michael-k
michael-k / strava_cli.md
Created November 6, 2019 08:42 — forked from michaellihs/strava_cli.md
Upload tracks to Strava from the Command Line

Upload GPS Tracks to Strava from your Command Line

This short tutorial describes how to upload GPS tracks to Strava using your command line interface / shell. It requires no special tools or any 3rd party code.

Run all following steps with your user logged in to Strava in your browser!

1. Generate an API Key

@michael-k
michael-k / tmux-cheatsheet.markdown
Created May 28, 2019 12:55 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Keybase proof

I hereby claim:

  • I am michael-k on github.
  • I am mfk (https://keybase.io/mfk) on keybase.
  • I have a public key ASBdig80wPajgfKM30Ar_xbusDUhA1wtOMow56Genn7IHgo

To claim this, I am signing this object:

@michael-k
michael-k / ignition.json
Created April 26, 2019 22:31 — forked from thetechnick/ignition.json
Hetzner Cloud terraform coreos install
{
"ignition": {
"version": "2.0.0",
"config": {}
},
"storage": {
},
"systemd": {},
"networkd": {},
"passwd": {
@michael-k
michael-k / 01_postfix_installer.md
Created October 28, 2017 20:02 — forked from solusipse/01_postfix_installer.md
Postfix + Dovecot + Postgresql + Postfixadmin + Roundcube

Postfix Installer

Following script may be used for configuring complete and secure email server on fresh install of Debian 7. It will probably work on other distributions using apt-get. After minor changes you'll be able to use it on other Linux distros.

Usage

  1. Run postfix.sh script.
  2. Configure postgres to allow connections.
  3. Configure postfix admin. Remember to set these:
## Böblinger-Strasse
curl -X POST "http://www.eco-public.com/ParcPublic/CounterData?table=ecobdd.%60Z_100034894%60&idOrganisme=607&idPdc=100034894&fin=09%2F06%2F2017&debut=01%2F01%2F2017&interval=4&pratiques=101034894%3B102034894%3B103034894%3B104034894"
## König-Karls-Brücke
curl -X POST "http://www.eco-public.com/ParcPublic/CounterData?table=ecobdd.%60Z_100037170%60&idOrganisme=607&idPdc=100037170&fin=09%2F06%2F2017&debut=01%2F01%2F2017&interval=4&pratiques="
#!/bin/bash
set -e
# Installation
# 1. Setup go-acd (https://github.com/go-acd/acd). You need to chmod
# acd-token.json to 0600 and manually create $HOME/.config/acd.json
# like the following:
# {"tokenFile":"/home/you/.config/acd-token.json","cacheFile":"/home/you/.cache/go-acd.cache"}
# Then make sure the `acd` command works. Note that the first run may
# take some time as it will fetch the full list of your files on ACD.