Skip to content

Instantly share code, notes, and snippets.

View maniankara's full-sized avatar

Anoop Vijayan Maniankara maniankara

View GitHub Profile
$ kubectl describe po/nginx-77c5cd5446-8rcjm
Name: nginx-77c5cd5446-8rcjm
Namespace: default
Priority: 0
PriorityClassName: <none>
Node: <none>
Labels: app=nginx
pod-template-hash=77c5cd5446
Annotations: <none>
Status: Pending
@maniankara
maniankara / provision-moosefs.sh
Last active September 7, 2018 08:40
Script for provisioning moosefs chunk server on redhat/amazon based distros
#!/bin/bash
ip=$1
size=$2
device=$3
# Install certificates and Repository
curl "https://ppa.moosefs.com/RPM-GPG-KEY-MooseFS" > /etc/pki/rpm-gpg/RPM-GPG-KEY-MooseFS
curl "http://ppa.moosefs.com/MooseFS-3-el7.repo" > /etc/yum.repos.d/MooseFS.repo
# Install moosefs-chunkserver, fuse and others
yum install -y gnupg2 ca-certificates e2fsprogs xfsprogs moosefs-chunkserver
# Provision and mount volume
@maniankara
maniankara / unmarshal.go
Created August 24, 2018 22:21
Unmarshalling a arbitrary json list. There are several examples of nested list but not at root
// try here: https://play.golang.org/p/SChzGHXYgOU
package main
import (
"encoding/json"
"fmt"
)
func main() {
birdJson := `{"birds":[{"pigeon":"likes to perch on rocks","eagle":"bird of prey"}]}`
service Node {
// temporarily mount the volume to a staging path
rpc NodeStageVolume (NodeStageVolumeRequest)
returns (NodeStageVolumeResponse) {}
// unmount the volume from staging path
rpc NodeUnstageVolume (NodeUnstageVolumeRequest)
returns (NodeUnstageVolumeResponse) {}
// mount the volume from staging to target path
service Controller {
// provisions a volume
rpc CreateVolume (CreateVolumeRequest)
returns (CreateVolumeResponse) {}
// deletes a previously provisioned volume
rpc DeleteVolume (DeleteVolumeRequest)
returns (DeleteVolumeResponse) {}
// make a volume available on some required node
service Identity {
// return the version and name of the plugin
rpc GetPluginInfo(GetPluginInfoRequest)
returns (GetPluginInfoResponse) {}
// reports whether the plugin has the ability of serving the Controller interface
rpc GetPluginCapabilities(GetPluginCapabilitiesRequest)
returns (GetPluginCapabilitiesResponse) {}
// called by the CO just to check whether the plugin is running or not
rpc Probe (ProbeRequest)
returns (ProbeResponse) {}
@maniankara
maniankara / kubernetes-csi-versions.csv
Created August 12, 2018 05:02
Kubernetes CSI release versions and Kubernetes support
CONTAINER CSI-SPEC RELEASE KUBERNETES-SUPPORT
driver-registrar v0.3 v0.3.0 Beta (v1.11)
external-provisioner v0.3 v0.3.0 Beta (v1.11)
external-attacher v0.3 v0.3.0 Beta (v1.11)
@maniankara
maniankara / LICENSE-2.0
Last active May 26, 2018 17:46
Get your local ip
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
@maniankara
maniankara / Airam_kirkas_valkoinen_lamput_suomi.csv
Last active May 3, 2018 14:17
A comparison of AIRAM's white lamps in Finland.
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 7 columns, instead of 2. in line 9.
KAUPPA,E-LOUKKA,LUMEN,KELVIN,WATTI,HINTA,URL
IKEA, E27, 1000lm, 4000k, 11W, 9.99€, https://www.ikea.com/fi/fi/catalog/products/80347851/
IKEA, E27, 600lm, 4000k, 7W, 7.99€, https://www.ikea.com/fi/fi/catalog/products/70347856/
K-RAUTA, E27, 1060lm, 4000k, 12W, 13.95€, https://www.k-rauta.fi/rautakauppa/led-pakkaslamppu-airam-12w-e27-1060lm-4000k--40c
K-RAUTA, E27, 806lm, 4000k, 9.5W, 9.95€, https://www.k-rauta.fi/rautakauppa/led-pakkaslamppu-airam-9-5w-e27-806lm-4000k--40c
VERKKOKAUPPA.COM, E27, 806lm, 4000k, 10W, 21.90€, https://www.verkkokauppa.com/fi/product/2281/hkngf/Airam-Radar-erikoisled-10-W-liiketunnistinlamppu-E27-kanta-4
VERKKOKAUPA.COM, E27, 810lm, 4000k, 10.5W, 19.90€, https://www.verkkokauppa.com/fi/product/39017/hknmv/Airam-CRI90-Led-10-5-W-vakiokupu-E27-kantaan
BAUHAUS, E27, 500m, 4000k, 5.5W, 5.50€, https://www.bauhaus.fi/koristelamppu-airam-led-5-5-w-4000-k.html
BAUHAUS, E27, 806m, 4000k, 8.5W, 9.95€, https://www.bauhaus.fi/vakiolamppu-airam-8-5-w-4000-k-himmennettava.html
BAUHAUS, E
@maniankara
maniankara / Airam_kirkas_valkoinen_lamput_suomi.csv
Created May 3, 2018 13:54
Here is a comparison of AIRAM's white lamps in Finland.
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 7 columns, instead of 8. in line 5.
KAUPPA,E-LOUKKA,LUMEN,KELVIN,WATTI,HINTA,URL
IKEA, E27, 1000lm, 4000k, 11W, 9.99, https://www.ikea.com/fi/fi/catalog/products/80347851/
IKEA, E27, 600lm, 4000k, 7W, 7.99, https://www.ikea.com/fi/fi/catalog/products/70347856/
K-RAUTA, E27, 1060lm, 4000k, 12W, 13.95, https://www.k-rauta.fi/rautakauppa/led-pakkaslamppu-airam-12w-e27-1060lm-4000k--40c
K-RAUTA, E27, 806lm, 4000k, 9.5W, 9.95, https://www.k-rauta.fi/rautakauppa/led-pakkaslamppu-airam-9-5w-e27-806lm-4000k--40c
VERKKOKAUPPA.COM, E27, 806lm, 4000k, 10W, 21,90, https://www.verkkokauppa.com/fi/product/2281/hkngf/Airam-Radar-erikoisled-10-W-liiketunnistinlamppu-E27-kanta-4
VERKKOKAUPA.COM, E27, 810lm, 4000k, 10.5W, 19,90, https://www.verkkokauppa.com/fi/product/39017/hknmv/Airam-CRI90-Led-10-5-W-vakiokupu-E27-kantaan