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
bind c screen 1 | |
bind ^c screen 1 | |
bind 0 select 10 | |
screen 1 | |
term xterm-256color | |
startup_message off | |
hardstatus off | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W} %c %{g}]' |
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
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
colorscheme spacegray | |
set t_Co=256 | |
set tabstop=4 " number of visual spaces per TAB | |
set softtabstop=4 " number of spaces in tab when editing | |
set shiftwidth=4 | |
set shiftround | |
set expandtab " tabs are spaces |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
config.vm.define "acs" do |acs| | |
acs.vm.box = "ubuntu/trusty64" |
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
#!/bin/bash | |
#13:16 $ ./check_memory.sh | |
#OK - Used: 197/3953 (4%);|'Memory Used'=197MB;3360;3755;4053 | |
#Swap Usage: 0/3905 (0%);|'Swap Used'=0MB;3319;3709;4005 | |
MEMTOTAL=$(free | awk '/Mem/ {printf("%d",$2/1024)}') | |
SWAPTOTAL=$(free | awk '/Swap/ {printf("%d", $2 / 1024)}') | |
# Get the memory usage in % |
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
# C-b is not acceptable -- Vim uses it | |
set-option -g prefix C-a | |
bind-key C-a last-window | |
# Start numbering at 1 | |
set -g base-index 1 | |
# Allows for faster key repetition | |
set -s escape-time 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
import subprocess | |
ps = [] | |
def main(): | |
for i in range(1,5): | |
p = subprocess.Popen("ansible all -i localhost, -c local -a 'date'", shell=True) | |
ps.append(p) | |
while True: | |
ps_status = [p.poll() for p in ps] | |
if all([x is not None for x in ps_status]): | |
break |
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
#!/usr/bin/env python | |
import subprocess | |
from multiprocessing import Pool | |
from functools import partial | |
import argparse | |
import sys | |
from itertools import chain | |
def execute_playbook(ansible_string, pb): |
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
# Works with Bash and ZSH | |
# Copy this into your ~/.bashrc or ~/.zshrc | |
# Install Lastpass cli -- https://github.com/lastpass/lastpass-cli | |
# Install sshpass | |
# OSX: $ brew install http://git.io/sshpass.rb | |
# Be sure to change <MYLASTPASS-PASSWORD-ID> in the install_keys() function | |
function install_keys (){ | |
echo "INFO: No SSH Key on server. Grabbing password from lastpass" | |
export SSHPASS=$(lpass show <MYLASTPASS-PASSWORD-ID> --password) | |
/usr/local/bin/sshpass -e ssh-copy-id $1 || return 255 |
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
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'tmux-plugins/tmux-pain-control' | |
set -g @plugin 'tmux-plugins/tmux-battery' | |
set -g @plugin 'arcticicestudio/nord-tmux' | |
set -g @plugin 'nhdaly/tmux-better-mouse-mode' | |
# C-b is not acceptable -- Vim uses it | |
set-option -g prefix C-a | |
bind-key C-a last-window |
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
source ~/antigen.zsh | |
# Load the oh-my-zsh's library. | |
antigen use oh-my-zsh | |
# Bundles from the default repo (robbyrussell's oh-my-zsh). | |
antigen bundle git | |
antigen bundle pip | |
antigen bundle command-not-found | |
antigen bundle docker |
OlderNewer