Skip to content

Instantly share code, notes, and snippets.

@DuGites
DuGites / configure_k8s.sh
Created May 28, 2020 20:56 — forked from lucashalbert/configure_k8s.sh
Script to install and configure kubernetes on CentOS-7
#######################
# === All Systems === #
#######################
# Ensure system is fully patched
sudo yum -y makecache fast
sudo yum -y update
# Disable swap
sudo swapoff -a
@DuGites
DuGites / install-kubernetes-flannel-centos7.md
Created May 28, 2020 20:51 — forked from rkaramandi/install-kubernetes-flannel-centos7.md
Installing Kubernetes with the Flannel Network Plugin on CentOS 7

Install Prerequisites on ALL (Worker and Master) Nodes

Let's remove any old versions of Docker if they exist:

sudo yum remove docker \
                  docker-common \
                  docker-selinux \
                  docker-engine
@DuGites
DuGites / jq to filter by value.md
Created April 18, 2019 00:28 — forked from ipbastola/jq to filter by value.md
JQ to filter JSON by value

JQ to filter JSON by value

Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'

Example: To get json record having _id equal 611

cat my.json | jq -c '.[] | select( ._id | contains(611))'

Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)

@DuGites
DuGites / jq to filter by value.md
Created April 18, 2019 00:28 — forked from ipbastola/jq to filter by value.md
JQ to filter JSON by value

JQ to filter JSON by value

Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'

Example: To get json record having _id equal 611

cat my.json | jq -c '.[] | select( ._id | contains(611))'

Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)

@DuGites
DuGites / Free O'Reilly Books.md
Created December 31, 2018 23:02 — forked from ellerbrock/Free O'Reilly Books.md
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@DuGites
DuGites / glog
Created November 17, 2018 00:29 — forked from metrofx/glog
Pretty git log, displays 20 last commits.
#!/bin/sh
git --no-pager log -n 20 --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
@DuGites
DuGites / sshclient.go
Created November 17, 2018 00:24 — forked from josephspurrier/sshclient.go
Golang SSH Client
package main
import (
"bufio"
"io/ioutil"
"os/signal"
//"syscall"
"fmt"
"log"
"os"
@DuGites
DuGites / _aws_golang_examples.md
Created October 17, 2018 16:28 — forked from eferro/_aws_golang_examples.md
golang aws: examples

AWS Golang SDK examples

killall ssh-agent; eval `ssh-agent`