Skip to content

Instantly share code, notes, and snippets.

View pozgo's full-sized avatar
💭
¯\_(ツ)_/¯

Ozzy pozgo

💭
¯\_(ツ)_/¯
View GitHub Profile
@pozgo
pozgo / haproxy-marathon-bridge
Last active August 29, 2015 14:12
haproxy-marathon-bridge
#!/bin/bash
set -o errexit -o nounset -o pipefail
function -h {
cat <<USAGE
USAGE: $name <marathon host:port>+
$name install_haproxy_system <marathon host:port>+
Generates a new configuration file for HAProxy from the specified Marathon
servers, replaces the file in /etc/haproxy and restarts the service.
@pozgo
pozgo / logger
Last active October 8, 2015 20:01
Journalctl to file for logstash-forwarder process
#!/bin/bash
is=`ps aux | grep "journalctl -f" | grep -v grep | awk '{print$2}'`
file=/var/log/system.log
msize="12400000" # Max file sieze set to 10MB
asize=`ls -l /var/log/system.log | awk '{print$5}'`
logstaship=`fleetctl list-machines -l | grep logsystem | awk '{print$2}'`
hostname=`hostname`
# Checking the size of log file
@pozgo
pozgo / Vagrantfile
Last active March 20, 2016 20:32
vagrant-dcoker-cloud
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "pozgo/centos7"
config.vm.define vm_name = "docker-cloud-node"
ip = "192.168.1.30"
# Edit bridge to match your own networking name-space (i.e. eth0)
config.vm.network "public_network", ip: ip, bridge: 'en0: Ethernet'
config.vm.provider "virtualbox" do |v|
v.memory = 4096
@pozgo
pozgo / all
Created March 20, 2016 21:23
vagrant-docker-cloud
---
docker_cloud_username: username
docker_cloud_api_key: api-key
#!/bin/bash
# dnsmasq restarting snippet. Works with El Capitan 10.11.x and Sierra 10.12
sudo killall -9 mDNSResponder; sudo killall -9 dnsmasq
echo "DNS Restarted"
@pozgo
pozgo / .tmux.conf
Created January 20, 2017 10:38
Tmux Configuration File
set-option -g prefix C-a
set-option -g -q mouse on
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-online-status'
@pozgo
pozgo / polinux-orange.tmuxtheme
Last active January 20, 2017 11:23
Polinux Tmux Theme
#
# Powerline Orange Block - Tmux Theme
# Created by Jim Myhrberg <contact@jimeh.me>.
#
# Inspired by vim-powerline: https://github.com/Lokaltog/powerline
#
# Requires terminal to be using a powerline compatible font, find one here:
# https://github.com/Lokaltog/powerline-fonts
#
@pozgo
pozgo / tmux-install.sh
Last active January 20, 2017 12:08
Tmux Installation
#!/usr/bin/env bash
# Supports only Linux(RedHat/Centos/Fedora) and OSX
# Bash Colors
red=`tput setaf 1`
green=`tput setaf 2`
yellow=`tput setaf 3`
white=`tput setaf 7`
bold=`tput bold`
reset=`tput sgr0`
separator=$(echo && printf '=%.0s' {1..100} && echo)
@pozgo
pozgo / .zshrc
Last active January 20, 2017 13:33
export ZSH=$HOME/.oh-my-zsh
export TERM="xterm-256color"
export LANG="en_US.UTF-8"
ZSH_THEME="powerlevel9k/powerlevel9k"
plugins=(git bundler osx rake ruby zsh-completions)
source $ZSH/oh-my-zsh.sh
[[ -e ~/.bashrc ]] && emulate sh -c 'source ~/.bashrc'
# Custom Settings
POWERLEVEL9K_MODE='awesome-patched'
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
@pozgo
pozgo / zsh-install.sh
Last active January 20, 2017 13:34
zsh-install
#!/usr/bin/env bash
# Supports only Linux(RedHat/Centos/Fedora) and OSX
# Bash Colors
red=`tput setaf 1`
green=`tput setaf 2`
yellow=`tput setaf 3`
white=`tput setaf 7`
bold=`tput bold`
reset=`tput sgr0`
separator=$(echo && printf '=%.0s' {1..100} && echo)