Skip to content

Instantly share code, notes, and snippets.


Anoop Vijayan Maniankara maniankara

View GitHub Profile
tombasche /
Last active Mar 29, 2021
DevOps Reading List

Books to read to learn DevOps

  • The DevOps Handbook - Kim, Humble, Debois, Willis, Allspaw

  • The Phoenix Project - Gene Kim

  • The Unicorn Project - Gene Kim

  • Reinventing Organisations - Frederic Laloux

lizrice /
Last active Aug 20, 2021
eBPF hello world
from bcc import BPF
from time import sleep
# This outputs a count of how many times the clone and execve syscalls have been made
# showing the use of an eBPF map (called syscall).
program = """
View suspend.nix
{ config, lib, pkgs, ...}:
with lib;
cfg =;
in {
options = {
services.batteryNotifier = {
enable = mkOption {
jbeda /
Last active Mar 10, 2021
Install prev kubeadm versions
kubeadm init --use-kubernetes-version=v1.5.6
jgsqware /
Last active Jun 28, 2021
Offline Kubeadm install

On master and nodes

Pull images form internet access laptop

docker pull
docker pull
docker pull
docker pull
docker pull weaveworks/weave-npc:1.8.2
docker pull weaveworks/weave-kube:1.8.2
hakobe / client.go
Created Sep 23, 2016
golang unix domain socket
View client.go
package main
import (
func reader(r io.Reader) {

How to add an image to a gist

  1. Create or find a gist that you own.
  2. Clone your gist (replace <hash> with your gist's hash):
    # with ssh
    git clone<hash>.git mygist
    # with https
    git clone<hash>.git mygist
mikecharles /
Last active May 3, 2021
Validate command line date argument in Python

Validates a --dates argument in Python with the following possible formats:

  • YYYYMMDD (eg. 20120515)
  • YYYYMMDD-YYYYMMDD (eg. 20140115-20140315)
  • yesterday
  • today

To use this function, reference it in the argparse setup:

joseluisq /
Last active Oct 17, 2021
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)


Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {