This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun knife-boostrap () | |
"Bootstrap a new node using chef." | |
(interactive) | |
(let | |
((ip (read-string "Node IP: ")) | |
(name (read-string "Node name: ")) | |
(role (let ((choices '("default" "mid-server" "unifi-controller"))) | |
(ido-completing-read "Role: " choices)))) | |
(async-shell-command | |
(concat "knife boostrap " ip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Package --- Sumary: | |
;;; Emacs main config file | |
;;; Commentary: | |
;;; Code: | |
(defun parent-directory (dir) | |
"return parent directory of dir" | |
(unless (equal "/" dir) | |
(file-name-directory (directory-file-name dir)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ZSH="~/.oh-my-zsh" | |
ZSH_THEME="bureau" | |
COMPLETION_WAITING_DOTS="true" | |
plugins=( | |
git | |
docker | |
emacs | |
kitchen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim') | |
if !filereadable(vimplug_exists) | |
if !executable("curl") | |
echoerr "You have to install curl or first install vim-plug yourself!" | |
execute "q!" | |
endif | |
echo "Installing Vim-Plug..." | |
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#set-option -g status-keys emacs | |
#set-option -g mode-keys emacs | |
# Remap prefix to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# split panes using | and - | |
bind | split-window -h | |
bind - split-window -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use-package treemacs | |
:ensure t | |
:defer t | |
:init | |
(with-eval-after-load 'winum | |
(define-key winum-keymap (kbd "M-0") #'treemacs-select-window)) | |
:config | |
(progn | |
(setq treemacs-collapse-dirs (if (executable-find "python3") 3 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Package --- Sumary: | |
;;; Commentary: | |
;;; Code: | |
;;; Create some ssane defaults | |
(setq delete-old-versions -1) ;; delete excessclojure play sound backup versions silently | |
(setq version-control t) ; use version control | |
(setq vc-make-backup-files t) ; make backups file even when in version controlled dir | |
(setq backup-directory-alist `(("." . "~/.emacs.d/backups"))) ; which directory to put backups file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete running pod | |
kubectl get pods | grep Running | awk '{print $1}' | xargs kubectl delete pods | |
# Delete all evicted pods | |
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Plot the load of a server with https://plot.ly | |
save load with: | |
while : | |
do | |
echo `uptime` >> load.txt | |
sleep 1m | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for user in `cat /etc/passwd | grep '._it' | cut -f1 -d':'` | |
do | |
`usermod -a -G www-data $user` | |
done |