Skip to content

Instantly share code, notes, and snippets.

View ljonesfl's full-sized avatar

Lee Jones ljonesfl

View GitHub Profile
@ljonesfl
ljonesfl / d-s.sh
Last active February 9, 2020 18:52
Shell into a docker container ./d-s.sh image-name
#!/bin/bash
echo "Looking for $1"
OUT="$(docker ps | awk '{if( $2==container ) print $1}'-v container=$1)"
if [ ${#OUT} -eq 0 ]
then
echo "Unable to locate a container running the image $1"
exit 1
fi
@ljonesfl
ljonesfl / .vimrc
Created July 31, 2019 00:04
My latest vim config
syntax on
set tabstop=4
set number
set cursorline
set hlsearch
set ignorecase
set nowrap
set autoindent
@ljonesfl
ljonesfl / database_backup.sh
Last active January 22, 2019 22:42
Script to create a rolling mysql backup.
#!/bin/bash
#
# This script exports the specified mysql database and deletes
# any backups older than a specified number of days.
#
# Created by Lee Jones
# http://leejon.es
#
@ljonesfl
ljonesfl / gist:f8a67bf3cbd63ddb0a458ecd0f0bdd7c
Last active April 19, 2019 18:58
git flow release helpers
alias git_push_release="git checkout master && git push && git push --tags && git checkout develop"
alias git_release="git checkout master && git pull && git checkout develop && bump | xargs git flow release start"
alias git_hotfix="git checkout master && git pull && bump --build && bump | xargs git flow hotfix start"
alias git_next_version='bump -p && echo -e "## $(bump)\n\n$(cat versionlog.md)" > versionlog.md && git commit -am bump && git push'
@ljonesfl
ljonesfl / gist:245f521c4bb338385c81290fcb79486a
Last active November 12, 2021 15:03
Subscribe to all github notifications in slack
/github subscribe {repo} issues pulls deployments commits commits:all releases comments branches reviews