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 / dict_tools.py
Created September 13, 2018 17:00
Python Dict Tools
def update_nested(d, keys, val):
"""Updates a nested dictionary value.
Args:
dictionary (dict): The dict we'll be updating
keys (list): A set of keys pointing to a subvalue of a dict e.g. ['a', 'b'] -> dict['a']['b']
val: A new value to set at dictionary[key1][key2][..]
Returns:
dict: Updated dictionary
# 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
@charlieparkes
charlieparkes / setup_osx.sh
Last active November 20, 2019 12:09
Setup OSX Development Environment
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install cask xquartz
brew install \
python3 \
pipenv \
pyenv \
vim \
mosh \
@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");
@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 / 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 / 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}
#!/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