Skip to content

Instantly share code, notes, and snippets.

View mssch's full-sized avatar

Mathias Schenck mssch

  • Rotterdam, Netherlands
View GitHub Profile
@mssch
mssch / pedantically_commented_playbook.yml
Created August 12, 2016 13:53 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@mssch
mssch / vimrc
Created March 13, 2016 17:22
vimrc
""" changed on 2016/03/13
""" msc
set nocompatible
""" Vundle - begin
filetype off " required by Vundle
set rtp+=~/.vim/bundle/Vundle.vim
@mssch
mssch / git-subm-pull.sh
Created March 12, 2016 12:06
pull all submodules latest parent branch commit
#!/bin/sh
set -e
# switch https to ssh
sed -i 's/https:\/\/\([^\/]*\)\/\([^\/]*\)/git@\1:\2/g' .gitmodules
# init and fetch all submodules at the parent specified SHA-1 commit
git submodule update --init
@mssch
mssch / misc.txt
Last active March 13, 2016 19:31
useful stuff
gce.py --host [host] | python -mjson.tool | pygmentize -l json
pip install --user -e .
git config --global core.excludesfile ~/.gitignore
@mssch
mssch / gcp_oneliners.sh
Last active February 24, 2016 16:21
gcp oneliners for every day sysadmin on google cloud platform
gcloud info |tr -d '[]' | awk '/account:/ {print $2}'
gcloud info |tr -d '[]' | awk '/project:/ {print $2}'
gcloud info |tr -d '[]' | awk '/zone:/ {print $2}'
docker login -e dummy@example.com -p $(gcloud auth print-access-token) -u _token https://gcr.io && docker push [your-image]