Skip to content

Instantly share code, notes, and snippets.

Ryan 09wattry

Block or report user

Report or block 09wattry

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
@09wattry
09wattry / DockerAliases
Last active Feb 14, 2019
A .bash_profile entry to create aliases for docker commands
View DockerAliases
# Docker Aliases
# Print all docker aliases
alias dkra='echo -e "1. impa=image prune \n2. pspa=container prune \n3. imra=image rm \$(images -aq) \n4. psra=container rm \$(ps -aq) \n5. pssa=container stop \$(ps -aq) \n6. pska=pssa && psra"'
alias dc='docker-compose'
alias impa='docker image prune'
alias pspa='docker container prune'
alias imra='docker image rm $(docker images -aq)'
alias psra='docker container rm $(docker ps -aq)'
@09wattry
09wattry / notification-manager.js
Created Jan 11, 2019
A simple Bootstrap alert/notification manager
View notification-manager.js
/*
* A simple notification manager to handle Bootstrap alerts.
*/
/**
*
* @param {String} selector a jQuery element selector
* @param {String} alertClass success|info|danger a Bootstrap alert class.
* @param {String} message a message to be displayed in the bootstrap alert.
* @param {Boolean} append should this message should append or replace the current message.
@09wattry
09wattry / validateControl.js
Last active Oct 5, 2018
JS function to enable and disable inputs as the previous was filled
View validateControl.js
function validateRelationshipForm(inputs) {
for (i = 0; i < (inputs.length - 2); i+=2) {
if (inputs[i].value.length > 0) {
inputs[i + 1].disabled = false;
if (inputs[i + 1].type == "button") {
inputs[i + 1].classList = ("btn btn-success");
}
} else {
inputs[i + 1].disabled = true;
if (inputs[i + 1].type == "button") {
View Git manual
GIT(1) Git Manual GIT(1)
NAME
git - the stupid content tracker
SYNOPSIS
git [--version] [--help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
@09wattry
09wattry / txt
Created Jan 4, 2018
Docker Cheatsheet
View txt
# Images
docker build -t friendlyname . # Create image using this directory's Dockerfile
docker image ls -a # List all images on this machine
docker image rm <image id> # Remove specified image from this machine
docker image rm $(docker image ls -a -q) # Remove all images from this machine
docker image prune # remove dangling images
docker tag <image> username/repository:tag # Tag <image> for upload to registry
docker push username/repository:tag # Upload tagged image to registry
docker run username/repository:tag # Run image from a registry
You can’t perform that action at this time.