Skip to content

Instantly share code, notes, and snippets.

View kevsersrca's full-sized avatar
🚀
Working from home

kev kevsersrca

🚀
Working from home
View GitHub Profile
helmins() {
kubectl -n kube-system create serviceaccount tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account=tiller
}
helmdel() {
kubectl -n kube-system delete deployment tiller-deploy
kubectl delete clusterrolebinding tiller
kubectl -n kube-system delete serviceaccount tiller
UPDATE tbladmins SET authmodule = '' AND authdata = '' WHERE username = 'youradminusername';
#!/bin/bash
IMAGE_DIRECTORY="/var/lib/libvirt/images"
KICKSTART_DIRECTORY="/var/www/html"
if [ ${DEBUG} ];then
OUTPUT=/dev/tty
else
OUTPUT=/dev/null
fi
@kevsersrca
kevsersrca / gist:5529916f086a42c483dac2fd1e28083d
Created September 29, 2018 17:52
docker web app permission
chown -R www-data:www-data /application/
@kevsersrca
kevsersrca / influxdbtest.sh
Last active August 7, 2018 11:10
influxdbtest
//Yeni db oluşturulması
curl -XPOST "http://localhost:8086/query?u=user&p=pass" --data-urlencode "q=CREATE DATABASE monitor"
//insert işlemi
curl -XPOST "http://localhost:8086/write?db=monitor&u=user&p=pass" -d 'network_traffic,host=test,interface=eth1,direction=inbound value=1'
//select işlemi
curl -G "http://localhost:8086/query?pretty=true&u=user&p=pass" --data-urlencode "db=mydb" --d "q=SELECT * FROM network_traffic"
@kevsersrca
kevsersrca / influxdbsecurity1.md
Last active August 7, 2018 11:02
influxdbsecurity1

/etc/influxdb/influxdb.conf dosyasını aşağıdaki gibi editleyiniz

[http]

  [...]

  # Determines whether HTTPS is enabled.
  https-enabled = true
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
apt-get update
apt-get install influxdb
apt-get install influxdb-client
@kevsersrca
kevsersrca / client.go
Created July 19, 2018 07:25 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4
@kevsersrca
kevsersrca / main.go
Created July 2, 2018 12:24
Bandwidth bytes to round size type
func BandwidthSize(bytes uint64) (float64, string) {
var tmp float64 = float64(bytes)
var s string = " "
bytes = uint64(tmp)
switch {
case bytes < uint64(2<<9):
case bytes < uint64(2<<19):