Skip to content

Instantly share code, notes, and snippets.

View mhulse's full-sized avatar
👋
👁 ❤️ open source software …

Michael Hulse mhulse

👋
👁 ❤️ open source software …
  • Instructure Inc.
  • Eugene, Oregon
View GitHub Profile
@cheephardware
cheephardware / nodepdfmaker.js
Last active March 14, 2023 22:38
Simple local HTML ---> PDF Example using Node.js / Puppeteer.js
//Full PDF options available at: https://pptr.dev/api/puppeteer.pdfoptions
const puppeteer = require('puppeteer');
(async () => {
// Create a browser instance
const browser = await puppeteer.launch();
// Create a new page
@mhulse
mhulse / gist:644c80f1c273f2e7e96a475b7b6aca5b
Last active March 2, 2022 21:56
Agile story point system
1 = 1-4 hours, a day or less, low complexity
2 = 1ish days, a day or so, medium complexity
4 = several days, 1/4 of a 3-week sprint, (maybe a meeting or two)
8 = the whole sprint, (and should likely be vetted to see if it can be broken up into two 4s, etc. break it down! potential blockers, meetings)
In general, there should be 16 points total for a developer, with 8-10 points for feature work (in a 1.5 week dev portion of the sprint).
@stefanofiorentino
stefanofiorentino / gist:aa0e76dadfd1fdb0cb0267c28363e306
Created November 7, 2019 16:47
c/c++ function to translate RGB bash terminal colot
// based on https://gist.github.com/mhulse/b11e568260fb8c3aa2a8
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);
fflush(stdout);
}
@FullStackForger
FullStackForger / .gitattributes
Last active July 5, 2023 17:59 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
# 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
javilobo8 / download-file.js
Last active April 9, 2024 12:01
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active January 31, 2024 14:45
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 https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • 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
kentbrew / pinmarklet.md
Last active April 9, 2024 18:34
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
StickyCube / index.html
Created June 27, 2016 22:52
Electron click through transparency example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test App</title>
</head>
<style>
html, body {
height: 100%;
@mhulse
mhulse / javascript-plugin-patterns-FOUND-protoytpe-newed.js
Last active May 16, 2021 14:45
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
// http://callmenick.com/post/slide-and-push-menus-with-css3-transitions
(function(window) {
'use strict';
/**
* Extend Object helper function.
*/
function extend(a, b) {
@mhulse
mhulse / shprite
Last active June 13, 2016 04:04
Simple bash command line script to make sprite textures for video games.
#!/usr/bin/env bash
function init() {
clear
# Display instructions:
echo -e "\033[1mSIMPLE SPRITE SHEET CREATION SCRIPT\033[0m"
echo "-----------------------------------"
echo "1. Navigate to the folder that contains your tile images."