Skip to content

Instantly share code, notes, and snippets.

@caglar10ur
caglar10ur / microk8s
Last active January 9, 2024 19:29
microk8s setup with istio
snap install microk8s --classic
sudo ufw default allow routed
sudo iptables -P FORWARD ACCEPT
microk8s.enable dns dashboard metrics-server
# grafana/dashboard
# http://IP:8080/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy/
# http://IP:8080/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/pod?namespace=default
microk8s.enable istio
@caglar10ur
caglar10ur / tmux.sh
Last active May 10, 2019 18:36
tmux.sh
#!/bin/sh
export PATH=$PATH:/usr/local/bin
# abort if we're already inside a TMUX session
[ "$TMUX" == "" ] || exit 0
# startup a "default" session if none currently exists
tmux has-session -t DEFAULT || tmux new-session -s DEFAULT -d
# present menu for user to choose which workspace to open
diff -u qmk_firmware/keyboards/massdrop/alt/keymaps/mac/keymap.c qmk_firmware/keyboards/massdrop/alt/keymaps/caglar10ur/keymap.c
--- qmk_firmware/keyboards/massdrop/alt/keymaps/mac/keymap.c 2019-04-19 17:36:12.000000000 -0700
+++ qmk_firmware/keyboards/massdrop/alt/keymaps/caglar10ur/keymap.c 2019-04-19 18:24:07.000000000 -0700
@@ -16,18 +16,18 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, \
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \
@caglar10ur
caglar10ur / unifi.json
Created March 11, 2019 21:04
unifi.json
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@caglar10ur
caglar10ur / keybase.md
Last active April 25, 2018 17:41
keybase.io

Keybase proof

I hereby claim:

  • I am caglar10ur on github.
  • I am caglar10ur (https://keybase.io/caglar10ur) on keybase.
  • I have a public key ASBF_OJkBbxuSacZ2uT7g4Qmg_o89ncaw79e0lLyUchF0go

To claim this, I am signing this object:

@caglar10ur
caglar10ur / wpa_supplicant.conf
Last active October 27, 2017 21:36
/etc/wpa_supplicant/wpa_supplicant.conf for Edimax EW-7811Un on Raspberry Pi
/etc/network/interfaces
---------------------------------------
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
#!/bin/bash
if [ ! -f /usr/bin/uidmapshift ]; then
wget https://bazaar.launchpad.net/~serge-hallyn/+junk/nsexec/download/head:/uidmapshift.c-20121030152620-2zy9rkac9y6htoia-8/uidmapshift.c
gcc -o uidmapshift uidmapshift.c
sudo mv uidmapshift /usr/bin/uidmapshift
rm -f uidmapshift.c
fi
uid=$(grep $USER /etc/subuid | cut -d : -f 2)
@caglar10ur
caglar10ur / unprivileged.sh
Last active October 7, 2016 16:12
unprivileged.sh
#!/bin/bash
uid=$(grep $USER /etc/subuid | cut -d : -f 2)
gid=$(grep $USER /etc/subgid | cut -d : -f 2)
range=$(grep $USER /etc/subuid | cut -d : -f 3)
NOCOLOR="\033[0m"
OKCOLOR="\033[0;32m"
UNPRIVILEGED="unpriv"
@caglar10ur
caglar10ur / profiling
Created May 3, 2016 20:59
profiling urls
https://golang.org/pkg/runtime/
https://golang.org/pkg/runtime/pprof/
https://golang.org/pkg/net/http/pprof/
https://golang.org/pkg/runtime/trace/
https://golang.org/cmd/trace/
http://stackoverflow.com/questions/32131339/the-go-1-5-trace-command
https://github.com/pkg/profile
https://github.com/davecheney/gcvis
@caglar10ur
caglar10ur / essentials.txt
Created January 25, 2016 23:40
Essential Packages
Linux-PAM
autoconf
automake
bash
bc
binutils
binutils-devel
bison
bzip2
coreutils