This file contains hidden or 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
# Ask Zabbix Agent to return value of the system.cpu.load metric | |
echo 'system.cpu.load' | nc -w2 myserver01 10050 | sed -r 's/^ZBXD..//' |
This file contains hidden or 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
###[ ZSH ] | |
# History | |
HISTFILE=~/.zsh_history | |
HISTSIZE=10000 | |
SAVEHIST=10000 | |
setopt append_history | |
setopt extended_history | |
setopt hist_expire_dups_first | |
setopt hist_ignore_dups |
This file contains hidden or 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
git config --global alias.workprofile 'config user.email [email protected]' | |
git config --global alias.tagv "\!git --no-pager tag --sort=v:refname --sort=creatordate --format='%(objectname) %(refname:strip=2)'" | |
git config --global alias.lv 'rev-parse HEAD' | |
git config --global alias.ltag "\!git tag --sort=v:refname --sort=creatordate | tail -n1" | |
git config --global alias.ltagv '!git tagv | tail -n1' | |
git config --global alias.itag "\!(git ltag || echo 0.0.0) | awk '{split(substr(\$0, 2), a, \".\"); printf \"v%d.%d.%d\", a[1]+1, 0, 0}'" | |
git config --global alias.iitag "\!(git ltag || echo 0.0.0) | awk '{split(substr(\$0, 2), a, \".\"); printf \"v%d.%d.%d\", a[1], a[2]+1, 0}'" | |
git config --global alias.iiitag "\!(git ltag || echo 0.0.0) | awk '{split(substr(\$0, 2), a, \".\"); printf \"v%d.%d.%d\", a[1], a[2], a[3]+1}'" | |
git config --global alias.aitag '!git tag $(git itag)' | |
git config --global alias.aiitag '!git tag $(git iitag)' |
This file contains hidden or 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
function walk() { | |
if [ $1 == 0 ]; then | |
echo -n "" > /tmp/deps; | |
fi | |
echo $2 >> /tmp/deps; | |
for N in $(seq $1); do | |
echo -n ' '; | |
done | |
echo -n '- '; | |
echo $2; |
This file contains hidden or 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
Move to https://github.com/jtyr/vagrantfile_config |
This file contains hidden or 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
# Create SSH keys to be able to use localhost as the proxy | |
ssh-keygen | |
cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys | |
chmod 600 ~/.ssh/authorized_key | |
chmod 700 ~/.ssh | |
# Create the SSH config | |
cat >~/.ssh/config <<END | |
Host * | |
# !!!Make sure this directory exists!!! |
This file contains hidden or 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
This was moved to https://github.com/jtyr/ansible-ini_inventory |
This file contains hidden or 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
### | |
# | |
# This Makefile helps to bundle and unbundle local Git repos. Directories | |
# containing bare repos should end with `.git` (e.g. `mybarerepo.git`). | |
# | |
### | |
DIRS = $(shell find . -type d -maxdepth 1) | |
BUNDLES = $(filter-out $(wildcard *.git.bundle), $(wildcard *.bundle)) | |
BUNDLES_BARE = $(wildcard *.git.bundle) |
This file contains hidden or 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
# jtyr's theme for oh-my-zsh | |
# Color shortcuts | |
RED=$fg_bold[red] | |
GREEN=$fg_bold[green] | |
YELLOW=$fg_bold[yellow] | |
BLUE=$fg_bold[blue] | |
CYAN=$fg_bold[cyan] | |
RESET=$reset_color |
This file contains hidden or 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
--- | |
### Inventory hosts file should contain this: | |
# test1 docker_source_image=centos:7 | |
# test2 docker_source_image=centos:7 | |
### | |
### Run the playbook like this: | |
# ansible-playbook -i hosts --diff ./docker_image_builder.yaml | |
### |