Skip to content

Instantly share code, notes, and snippets.

View thaJeztah's full-sized avatar
🐳
Reviewing da peee-aaaaarrs

Sebastiaan van Stijn thaJeztah

🐳
Reviewing da peee-aaaaarrs
  • thaJeztah
  • Netherlands
  • 10:20 (UTC +02:00)
  • X @thaJeztah
View GitHub Profile
@thaJeztah
thaJeztah / git-auto-sign-commits.sh
Created September 13, 2019 14:04 — forked from mort3za/git-auto-sign-commits.sh
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
# Source: http://frippery.org/busybox/
# This Dockerfile builds a (32-bit) busybox images which is suitable for
# running many of the integration-cli tests for Docker against a Windows
# daemon. It will not run on nanoserver as that is 64-bit only.
#
# John Howard (IRC jhowardmsft, Email john.howard@microsoft.com)
#
# To build: docker build -t busybox .
# To publish: Needs someone with publishing rights
#
@thaJeztah
thaJeztah / dockerhub-v2-api-user.sh
Created June 7, 2019 10:56 — forked from kizbitz/dockerhub-v2-api-user.sh
Get the list of images and tags for a Docker Hub user account.
#!/bin/bash
# Example for the Docker Hub V2 API
# Returns all imagas and tags associated with a Docker Hub user account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username and password
UNAME=""
UPASS=""
@thaJeztah
thaJeztah / git-cheat-list.md
Created September 28, 2018 12:31
Git cheat list

Git cheat list

  • stashing everything except staged changes:

    git stash -ku
    
  • fixing dates and authors in the commits:

    git rebase -i HEAD~<NUMBER_OF_LAST_COMMITS_TO_REBASE>
    
@thaJeztah
thaJeztah / dapply
Created July 11, 2018 13:35 — forked from cam8001/dapply
Apply a patch directly from a URL without downloading it first.
#!/bin/bash
# Downloads and applies a patch from Drupal.org.
if [ -z "$1" ]
then
echo "You need to supply a URL to a patch file."
exit
fi
URL=$1;
@thaJeztah
thaJeztah / boxstarter.ps1
Created February 28, 2018 10:44 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
BITS 32
org 0x05000000
db 0x7F, "ELF"
dd 1
dd 0
dd $$
dw 2
dw 3
dd 0x0500001B

Docker Swarm with Macvlan, Consul and Autoscaling

TL;DR:

This will get you routable containers with IPs on your existing subnets, advertising to Consul. They will also be scalable and placed across a cluster of Swarm hosts. It's assumed that you are already running Consul, so if not, there are a ton of tutorials out there. It's also assumed you know how to install Docker and various Linux kernels.

Bonus: We add an autoscaling API called Orbiter (https://gianarb.it/blog/orbiter-the-swarm-autoscaler-moves).

I just want to run containers, like now, on my existing infrastructure and networks!

So you have an existing environment. You use Consul for service discovery. Life is good. Containers are now a thing and you want to work them in without having to worry about overlay networking or reverse proxies. You also don't want to add extra latency (as some naysayers could use it as fuel to kill your hopes and dreams). Lastly, you don't have a lot of time to invest in a complex orchestration tool, such a

@thaJeztah
thaJeztah / git-serve.md
Created July 21, 2017 13:27 — forked from datagrok/git-serve.md
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.

Launch a one-off git server from any local repository.

I [tweeted this already][1] but I thought it could use some expansion:

Enable decentralized git workflow: git config alias.serve "daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/"

Say you use a git workflow that involves working with a core "official" repository that you pull and push your changes from and into. I'm sure many companies do this, as do many users of git hosting services like Github.

Say that server, or Github, goes down for a bit.

@thaJeztah
thaJeztah / log.md
Created April 7, 2017 10:42 — forked from m-jowett/log.md
Setup LibreOffice Online (Log/Guide) [WIP]

Setup LibreOffice Online (Log/Guide) [WIP]

About

This guide/log is based off my experience attempting to build and install LibreOffice Online and it's dependencies on my system.

The end goal is to get LibreOffice Online integrated with Karoshi Server.

LibreOffice Online is still in development (17/06/16).