Skip to content

Instantly share code, notes, and snippets.

View maniankara's full-sized avatar

Anoop Vijayan Maniankara maniankara

View GitHub Profile
@repeatingbeats
repeatingbeats / nodeunit_example.js
Created January 27, 2011 20:07
Example structure for nodeunit tests with nested groups and setUp/tearDown functions
/**
* Example structure for nodeunit tests with nested groups and setup/teardown
* functions. Run | nodeunit nodeunit_example.js | to see a printout of
* function names in the order that they are called. There aren't any actual
* tests here.
*/
process.env.NODE_ENV = 'test';
var testCase = require('nodeunit').testCase;
@tombasche
tombasche / devopsreading.md
Last active March 29, 2021 17:26
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

@danriti
danriti / hipchat-v2.sh
Last active July 19, 2021 10:49
HipChat API v2 - Send a message to a room using cURL
#!/bin/bash
# Set the ROOM_ID & AUTH_TOKEN variables below.
# Further instructions at https://www.hipchat.com/docs/apiv2/auth
ROOM_ID=XXX
AUTH_TOKEN=XXX
MESSAGE="Hello world!"
curl -H "Content-Type: application/json" \
@jbeda
jbeda / update-centos-7.sh
Last active February 9, 2022 11:50
Install prev kubeadm versions
kubeadm init --use-kubernetes-version=v1.5.6
@mikecharles
mikecharles / README.md
Last active December 1, 2022 08:50
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:

@hakobe
hakobe / client.go
Created September 23, 2016 16:33
golang unix domain socket
package main
import (
"io"
"log"
"net"
"time"
)
func reader(r io.Reader) {
@lizrice
lizrice / hello_map.py
Last active July 19, 2023 08:20
eBPF hello world
#!/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);
{ config, lib, pkgs, ...}:
with lib;
let
cfg = config.services.batteryNotifier;
in {
options = {
services.batteryNotifier = {
enable = mkOption {
@jgsqware
jgsqware / kubeadm-install-offline.md
Last active March 7, 2024 05:48
Offline Kubeadm install

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