Skip to content

Instantly share code, notes, and snippets.

👁❤️open source software …

Michael Hulse mhulse

👁❤️open source software …
Block or report user

Report or block mhulse

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
mhulse / fromhex.bash
Last active Jul 5, 2019
Bash function to convert hex to 256 terminal color.
View fromhex.bash
# fromhex A52A2A
# fromhex "#A52A2A"
# BLUE_VIOLET=$(fromhex "#8A2BE2")
function fromhex() {
if [[ $hex == "#"* ]]; then
hex=$(echo $1 | awk '{print substr($0,2)}')
r=$(printf '0x%0.2s' "$hex")
mhulse / javascript-plugin-patterns-FOUND-protoytpe-newed.js
Last active Jun 28, 2019
Some of my favorite JavaScript plugin design patterns: The Facade Pattern, The Revealing Module Pattern, Immediately-invoked Function Expressions (IIFE)s, The Module Pattern imports and exports
View javascript-plugin-patterns-FOUND-protoytpe-newed.js
(function(window) {
'use strict';
* Extend Object helper function.
function extend(a, b) {
mhulse / SelectActiveLayers.jsx
Last active Apr 24, 2019
Adobe Illustrator script to select highlighted layers. Written by @Qwertyfly and only slightly modified by me. Original code and discussion can found here:
View SelectActiveLayers.jsx
#target illustrator
function make() {
var name = 'temp'; // Action name.
var set = 'temp'; // Set name.
var level = app.userInteractionLevel;
var action;
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
mhulse / Super simple background image slideshow.css
Last active Apr 14, 2019
Super simple jQuery background-image random slideshow (using CSS3 for the transition and gets the image paths via HTML5 `data` attribute).
View Super simple background image slideshow.css
[data-slides] {
background-image: url(../../uploads/banner1.jpg); /* Default image. */
background-repeat: no-repeat;
background-position: center top;
background-size: cover;
transition: background-image 1s linear;
/* Use additional CSS to control the `height` of `[data-slides]`, like so: */
mhulse /
Last active Mar 23, 2019
Image Magick command to convert images to the images average color and print file name in center of image
magick mogrify \
-colors 1 \
-shave 1x1 \
-bordercolor black \
-border 1 \
-pointsize 48 \
-fill black \
-gravity center \
-annotate +0+0 "%[f]" \
mhulse / Amazon S3 snippets and Transmit FTP cloud
Last active Feb 22, 2019
Amazon S3 snippets... Transmit FTP cloud settings... Other related goodies...
View Amazon S3 snippets and Transmit FTP cloud

S3 Website "Index Document"


<title>403 Forbidden</title>
mhulse /
Created Dec 13, 2012
Simple Python accessors (@getter/@Setter and @deleter) example/test using mixin and decorators... I'm using Python 2.6 for testing.
import pprint
# pprint.pprint(dir(obj))
# pprint.pprint(list)
# $ python runscript am_script2
class BaseMixin(object):
# Init:
mhulse / css.css
Created Jan 29, 2019
Slick Carousel CSS/JS; putting here for posterity’s sake
View css.css
.ap_library {
position: relative;
.ap_library > :first-child {
margin-top: 0;
.ap_library > :last-child {
margin-bottom: 0;
.ap_library {
mhulse / Setting up Google Cloud Storage with CORS for Web
Last active Jan 22, 2019
Setting up CORS on Google Cloud Storage: An unofficial quick start guide to serving web fonts from Google's cloud. (I'm sure a lot of this info could be improved... Please leave comments if you have tips/improvements.)
View Setting up Google Cloud Storage with CORS for Web


Google Cloud Storage

You'll want to login using an official Google account (i.e. if this is for your company, use the comapany Gmail account vs. a personal one.)

When logging in, you might be prompted to verify the account; if so, enter your cell number to get a verification e-mail or phone call.

Once verified, you'll have to agree to the terms of service; do that, and click continue.

mhulse /
Last active Jan 11, 2019
Simple script to transfer multiple repos from Bitbucket to GitHub (or vice versa). Inspired by
#!/usr/bin/env bash
# This script assumes you have your ssh keys setup for Bitbucket and GitHub.
# It also assumes you have created the repos on GitHub already and the URL slugs are an exact match.
# Also, this script will barf if you try to transfer an empty repo.
# Note that this code does not transfer wikis, downloads or issues.
# Also note, you may have to turn on QOS upload speed limiting so your router
# doesn’t freak out; I limited my upload bandwidth to 2Mbps.
# Don’t forget to `chmod u+x <this file>.sh` in order to execute it via `./<this file>.sh`.
You can’t perform that action at this time.