Skip to content

Instantly share code, notes, and snippets.

View charlieparkes's full-sized avatar
🎻
k8s will fix this

Charlie Mathews charlieparkes

🎻
k8s will fix this
  • Backend Software Engineer @Quanata
  • Franklin, TN
View GitHub Profile
@charlieparkes
charlieparkes / install_tmux.sh
Created September 7, 2017 14:44
Install tmux on CentOS 6.9
# Sources:
# https://gist.github.com/xkniu/0b752143a5990cdb3379
# https://gist.github.com/Root-shady/d48d5282651634f464af
# http://www.nigeldunn.com/2011/12/11/libevent-2-0-so-5-cannot-open-shared-object-file-no-such-file-or-directory/
sudo yum remove tmux libevent libevent-devel libevent-headers
sudo yum install gcc kernel-devel make ncurses-devel
mkdir /tmp/tmux-setup
#!/usr/bin/env bash
echo "Copying environment to $1..."
/usr/bin/env scp -r .ssh $1:~
/usr/bin/env scp -r .vimrc $1:~
/usr/bin/env scp -r .bash* $1:~
/usr/bin/env scp -r .tmux* $1:~
/usr/bin/env scp -r $0 $1:~
echo "Done"
@charlieparkes
charlieparkes / .vimrc
Last active September 27, 2017 18:40
vim #config
"Version 5.5
"type ":help X" for help on a command, e.g. ":help ts" for tabstop
set number
set nocp
set expandtab "replace <Tab> with spaces (except in Makefiles, see below)
set smarttab "better behaviour when you type <Tab>
set ts=4 "set tabstop to 4 chars
@charlieparkes
charlieparkes / .bash_profile
Last active September 27, 2017 18:40
bash #config
##
## Color Definitions
##
export BLUE=""
export CYAN=""
export GREEN=""
export RED=""
export OFF=""
LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:';
export LS_COLORS
@charlieparkes
charlieparkes / shared_tmux
Created September 30, 2017 01:12
How to share tmux sessions #tmux
Shared tmux session with unified input
---- Owner ----
tmux -S /tmp/{session_name} new -s {session_name}
chgrp {shared_group} /tmp/session_name
---- Participant ----
tmux -S /tmp/{session_name} a -t {session_name}
@charlieparkes
charlieparkes / .tmux.conf
Last active September 30, 2017 01:12
tmux #config #tmux
#remap prefix from Ctrl-b to Ctrl-a
unbind C-b
set-option -g prefix C-a
bind a send-prefix
# rebind split commands
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
@charlieparkes
charlieparkes / keybase.md
Created September 30, 2017 01:59
keybase.md

Keybase proof

I hereby claim:

  • I am alphachai on github.
  • I am alphachai (https://keybase.io/alphachai) on keybase.
  • I have a public key ASBhDiHm9JEj_5IpUPXfEVQcV2_JDSfqXsCuJQQJoEJDhgo

To claim this, I am signing this object:

@charlieparkes
charlieparkes / answers.txt
Last active October 1, 2017 19:36
nevercompletedgame.com
1 a
2 3
3 f
4 35
5 8
6 fantastic
7 e1
8 15
9 moon
10 infinity
@charlieparkes
charlieparkes / packages.sh
Created May 31, 2018 01:34
Debian packages by size #bash
#!/bin/sh
# lists installed Debian packages, sorting by package size
# This could just be a perl script extracting the install package info.
# but I made it a sh script to allow for sort manipulation afterwards.
# Installed packages read from /var/lib/dpkg/status
echo '
open(FILE,"/var/lib/dpkg/status");
# We are in client mode
client
## We are creating a tunnel
dev tun
## We use TCP
proto tcp
remote vpn.everest-dev.aws.mintel.com 443