Skip to content

Instantly share code, notes, and snippets.

View bcatubig's full-sized avatar

Brandon Catubig bcatubig

View GitHub Profile
@bcatubig
bcatubig / gist:5a9b430bb49ccc45d611bc347bd13226
Created December 19, 2016 03:25
Python Bash Multiprocessing
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
# 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
@bcatubig
bcatubig / Ansible VagrantFile
Last active February 16, 2016 16:32
Simple Vagrant Ansible Config
# -*- 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"
@bcatubig
bcatubig / vimrc
Created February 4, 2016 03:55
A fucking awesome vimrc
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
@bcatubig
bcatubig / gist:5822ae10172f6ebe9983
Last active November 25, 2015 22:24
Basic .screenrc with status bar
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}]'