Skip to content

Instantly share code, notes, and snippets.

Bashing for profit

Chris Yocum christronyxyocum

Block or report user

Report or block christronyxyocum

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# Your init script
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
# An example hack to log to the console when each text editor is saved.
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
christronyxyocum /
Created May 11, 2018
Basic script to detect and update active Docker container images
docker ps -aq > docker_ids.txt
while read CONTAINER
docker inspect ${CONTAINER} |grep -v sha |grep Image |awk '{print $2}' |tr -d '",'
done < docker_ids.txt > docker_images.txt
while read IMAGE
docker pull ${IMAGE}
christronyxyocum /
Created May 8, 2018
Shell script to determine OS and echo it to the shell
# Determine OS
# Detects which OS and, if it is Linux, it will detect which Linux distribution.
# The result is then echoed to the shell.
OS=$(uname -s)
REV=$(uname -r)
MACH=$(uname -m)
You can’t perform that action at this time.