Skip to content

Instantly share code, notes, and snippets.

Avatar

Anoop Vijayan Maniankara maniankara

View GitHub Profile
@tombasche
tombasche / devopsreading.md
Last active Mar 29, 2021
DevOps Reading List
View devopsreading.md

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
lizrice / hello_map.py
Last active Aug 20, 2021
eBPF hello world
View hello_map.py
#!/usr/bin/python
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 = """
BPF_HASH(syscall);
View suspend.nix
{ config, lib, pkgs, ...}:
with lib;
let
cfg = config.services.batteryNotifier;
in {
options = {
services.batteryNotifier = {
enable = mkOption {
View k8s-pi.md
@jbeda
jbeda / update-centos-7.sh
Last active Mar 10, 2021
Install prev kubeadm versions
View update-centos-7.sh
kubeadm init --use-kubernetes-version=v1.5.6
@jgsqware
jgsqware / kubeadm-install-offline.md
Last active Jun 28, 2021
Offline Kubeadm install
View kubeadm-install-offline.md

On master and nodes

Pull images form internet access laptop

docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-proxy-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.5.0
docker pull weaveworks/weave-npc:1.8.2
docker pull weaveworks/weave-kube:1.8.2
@hakobe
hakobe / client.go
Created Sep 23, 2016
golang unix domain socket
View client.go
package main
import (
"io"
"log"
"net"
"time"
)
func reader(r io.Reader) {
View how-to-add-image-to-gist.md

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 git@gist.github.com:<hash>.git mygist
    
    # with https
    git clone https://gist.github.com/<hash>.git mygist
@mikecharles
mikecharles / README.md
Last active May 3, 2021
Validate command line date argument in Python
View README.md

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
joseluisq / terminal-git-branch-name.md
Last active Oct 17, 2021
Add Git Branch Name to Terminal Prompt (Linux/Mac)
View terminal-git-branch-name.md

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

image

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

# Git branch in prompt.

parse_git_branch() {