Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View cdgraff's full-sized avatar

AlejandroF cdgraff

View GitHub Profile
@cdgraff
cdgraff / gist:57c16a9d04341900044ce2fe913e782d
Created February 11, 2018 20:41
k8s - Delete Evicted PODs
kubectl get po -a --all-namespaces -o json | jq '.items[] | select(.status.reason!=null) | select(.status.reason | contains("Evicted")) | "kubectl delete po \(.metadata.name) -n \(.metadata.namespace)"' | xargs -n 1 bash -c
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@cdgraff
cdgraff / install.md
Last active January 7, 2018 03:30 — forked from floehopper/install.md
Install rtl-sdr on Raspian on Raspberry Pi
jamesmead@floehopper.local:~$ sudo dd bs=1m if=/Users/jamesmead/Downloads/2015-02-16-raspbian-wheezy.img of=/dev/disk2
pi@raspberrypi ~ $ sudo raspi-config
# Choose option 1 to "Expand Filesystem" - Ensures that all of the SD card storage is available to the OS
# Choose Finish & reboot

pi@raspberrypi ~ $ sudo apt-get update
@cdgraff
cdgraff / gist:0c4b699ef84b8436bf3cd2919862a6f1
Created November 23, 2017 20:14 — forked from kurokikaze/gist:350fe1713591641b3b42
install chrome from powershell
(new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', 'c:/temp/chrome.exe');. c:/temp/chrome.exe /silent /install;rm c:/temp -rec
@cdgraff
cdgraff / AWS Swarm cluster.md
Created April 2, 2017 00:20 — forked from ghoranyi/AWS Swarm cluster.md
Create a Docker 1.12 Swarm cluster on AWS

This gist will drive you through creating a Docker 1.12 Swarm cluster (with Swarm mode) on AWS infrastructure.

Prerequisites

You need a few things already prepared in order to get started. You need at least Docker 1.12 set up. I was using the stable version of Docker for mac for preparing this guide.

$ docker --version
Docker version 1.12.0, build 8eab29e

You also need Docker machine installed.

@cdgraff
cdgraff / rclocal
Created March 25, 2017 23:12
Ifconfig to tunning network card Queue
# increase txqueuelen for 10G NICS
/sbin/ifconfig p5p1 txqueuelen 10000
@cdgraff
cdgraff / limit.conf
Created March 25, 2017 19:12
HLS Tunning limit.conf
* soft nproc 1048576
* hard nproc 1048576
* soft nofile 1048576
* hard nofile 1048576
* soft stack 1048576
* hard stack 1048576
* soft memlock unlimited
* hard memlock unlimited
@cdgraff
cdgraff / etc.sysctl.d.20-streaming-tuning.conf
Created March 25, 2017 19:07
sysctl conf setting for Ubuntu 14.04.1
fs.file-max=1048576
fs.inotify.max_user_instances=1048576
fs.inotify.max_user_watches=1048576
fs.nr_open=1048576
net.core.netdev_max_backlog=1048576
net.core.rmem_max=16777216
net.core.somaxconn=65535
net.core.wmem_max=16777216
net.ipv4.tcp_congestion_control=htcp
net.ipv4.ip_local_port_range=1024 65535
@cdgraff
cdgraff / query.influxdb.sql
Created February 20, 2017 02:48
Query to get the data form Influxdb
SELECT mean("value") FROM /streams./ WHERE $timeFilter GROUP BY time($interval) fill(null)
@cdgraff
cdgraff / telegraf.statsd.conf
Created February 20, 2017 02:22
Telegraf Statsd Configuration
# # Statsd Server
[[inputs.statsd]]
# ## Address and port to host UDP listener on
service_address = ":8125"
# ## separator to use between elements of a statsd metric
metric_separator = "."
# ## Statsd data translation templates, more info can be read here:
# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#graphite