Skip to content

Instantly share code, notes, and snippets.

View fzerorubigd's full-sized avatar
🤷‍♂️
/shrug

Forud fzerorubigd

🤷‍♂️
/shrug
View GitHub Profile
@fzerorubigd
fzerorubigd / -
Created September 19, 2017 10:01
package main
import (
"log"
"os"
"flag"
"fmt"
@fzerorubigd
fzerorubigd / configmap.yml
Last active February 1, 2018 14:33
Master netdata configuration, using kubelet manifest
apiVersion: v1
kind: ConfigMap
metadata:
name: netdata-slave-cfg
namespace: monitoring
data:
ND_1: "netdata.conf|global/memory mode = ram"
ND_2: "netdata.conf|web/mode = none"
ND_3: "stream.conf|stream/enabled = yes"
ND_4: "stream.conf|stream/destination = 192.168.10.1:19999"
apiVersion: batch/v2alpha1
kind: CronJob
metadata:
creationTimestamp: 2017-08-09T15:17:59Z
labels:
run: hello
name: hello
namespace: default
spec:
concurrencyPolicy: Forbid
apiVersion: v1
kind: Namespace
metadata:
name: monitoring
---
apiVersion: v1
kind: Pod
metadata:
name: netdata-master
namespace: monitoring
@fzerorubigd
fzerorubigd / ingress-kubeadm-rbac
Created July 6, 2017 08:07
ingress for new version of kebeadm (>1.6)
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: ingress
rules:
- apiGroups:
- ""
- "extensions"
resources:
- configmaps
unbind C-b
set -g prefix C-b
#urxvt tab like window switching (-n: no prior escape seq)
bind -n M-down new-window
bind -n M-left prev
bind -n M-right next
#bind -n C-left swap-window -t -1
#bind -n C-right swap-window -t +1
if [ ! -e ~/.antigen/source/antigen.zsh ];then
mkdir ~/.antigen
git clone https://github.com/zsh-users/antigen.git ~/.antigen/source
fi;
if [ ! -e "$HOME/.scm_breeze/scm_breeze.sh" ];then
git clone git://github.com/scmbreeze/scm_breeze.git ~/.scm_breeze
fi;
source ~/.antigen/source/antigen.zsh
package main
import (
"bytes"
"io/ioutil"
"log"
"net/http"
"os"
"time"
Section "InputClass"
Identifier "keyboard"
Driver "evdev"
MatchIsKeyboard "on"
Option "XkbModel" "evdev"
Option "XkbLayout" "us,ir"
Option "XkbOptions" "grp:switch,grp:alt_shift_toggle,grp_led:scroll"
EndSection
#!/usr/bin/perl
## Made by Pierre Mavro/Deimosfr <deimos@deimos.fr>
use strict;
use warnings;
use utf8;
use Getopt::Long;
# Get CPU usage
sub get_network_usage {