Skip to content

Instantly share code, notes, and snippets.

View mbround18's full-sized avatar
😍
Designing

Michael mbround18

😍
Designing
View GitHub Profile
@mbround18
mbround18 / README.md
Last active October 30, 2022 21:34
Video Background Script for dev.to Article
class ElementHandler {
element(element) {
element.append(`<link
rel="stylesheet"
type="text/css"
data-id="foundry-login"
href="https://cdn.jsdelivr.net/gh/TheEpicSnowWolf/Foundry-VTT-Prettier-Login-Screen@main/foundry_login.css"
>`, {html: true});
console.log("injected");
}
@40a
40a / check_docker_tag.sh
Created June 27, 2017 14:07 — forked from ryanmaclean/check_docker_tag.sh
Check if Docker Image with Tag Exists
#!/bin/bash
# This script will check to see if a Docker image exists for a specific tag.
# Taken from here, with love: https://www.reddit.com/r/docker/comments/4hwdma/check_if_an_image_tag_for_a_private_repo_exists/
TOKEN=$( curl -sSLd "username=${DOCKER_HUB_USERNAME}&password=${DOCKER_HUB_PASSWORD}" https://hub.docker.com/v2/users/login | jq -r ".token" )
curl -sH "Authorization: JWT $TOKEN" "https://hub.docker.com/v2/repositories/${DOCKER_REPO}/tags/${DOCKER_TAG}/" | jq .
#{
# "name": "latest",
# "id": 780668,
#!/bin/bash -e
# This will download files or set the hosts file to defaults.
# USAGE:
# DESCRIPTION OF ENV VARS HERE
###############################################################################
set -e # exit on command errors (so you MUST handle exit codes properly!)
set -o pipefail # capture fail exit codes in piped commands
#set -x # execution tracing debug messages
# get switches
@mbround18
mbround18 / .bashrc
Last active October 14, 2022 04:02
Personal bashrc
#--------------------------------------------------------------------------------------------
# if found on gist use `git clone https://gist.github.com/650d59476b86fbe885e66af953099006.git .`
# this is a modified version of Emmanuel Rouat [no-email] bashrc how to which can be found at
# `http://tldp.org/LDP/abs/html/sample-bashrc.html`
#--------------------------------------------------------------------------------------------
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
#-------------------------------------------------------------
@hendrikswan
hendrikswan / app.rb
Created December 20, 2011 21:29
sample sinatra mongodb service
require 'sinatra'
require 'mongoid'
require 'json'
require "sinatra/reloader" if development?
Mongoid.load!("mongoid.yml")
class Price
include Mongoid::Document