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
stefanofiorentino / gist:aa0e76dadfd1fdb0cb0267c28363e306
Created Nov 7, 2019
c/c++ function to translate RGB bash terminal colot
View gist:aa0e76dadfd1fdb0cb0267c28363e306
// based on
void UserLedManager::print_terminal_background_color(const int &r, const int &g, const int &b) const
auto r_weight = r < 75 ? 0 : (r - 35) / 40;
auto g_weight = g < 75 ? 0 : (g - 35) / 40;
auto b_weight = b < 75 ? 0 : (b - 35) / 40;
int status = (r_weight * 6 * 6 + g_weight * 6 + b_weight + 16);
fprintf(stdout, "\e[48;5;%dm %3d \e[0m", status, status);
FullStackForger / .gitattributes
Last active Feb 16, 2020 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
View .gitattributes
# Unity
*.cginc text
*.cs diff=csharp text
*.shader text
# Unity YAML
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
javilobo8 / download-file.js
Last active Feb 25, 2020
Download files with AJAX (axios)
View download-file.js
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
nrollr /
Last active Feb 17, 2020
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

kentbrew /
Last active Jan 14, 2020
How to recreate your long-lost Pinterest bookmarklet.

How to recreate your long-lost Pinterest bookmarklet.

Right-click your bookmarks bar and choose Add Page (Chrome) or New Bookmarklet (Firefox).

In Name, put this:

Pin It

In URL, put this:

StickyCube / index.html
Created Jun 27, 2016
Electron click through transparency example
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Test App</title>
html, body {
height: 100%;
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 / shprite
Last active Jun 13, 2016
Simple bash command line script to make sprite textures for video games.
View shprite
#!/usr/bin/env bash
function init() {
# Display instructions:
echo "-----------------------------------"
echo "1. Navigate to the folder that contains your tile images."
View npm_completion_with_install
#!/usr/bin/env bash #adding this to force silly gist highlighting. REMOVE THIS
# This is a modified version of the script generated by to include `npm install` autocompletion.
# Basically we added `if` blocks to check for `install` subcommand.
# npm command completion script
# Installation: npm completion >> ~/.bashrc (or ~/.zshrc)
andersdn / _tlp-dashboard.html
Last active Jan 29, 2017
Basic (jquery) ajax template loading for underscore js
View _tlp-dashboard.html
<h1>Foo is <%= foo %></h1>
<% _.each(baz,function(value,index){ %>
<h2>Baz <%= index %> is <%= value %>
<% }) %>
You can’t perform that action at this time.