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
@jstuckey
jstuckey / Bash Prompt with Git and Emoji
Last active October 13, 2022 02:06
Bash Prompt with Git and Emoji - Add to ~/.bash_profile
git_branch='`git rev-parse --abbrev-ref HEAD 2> /dev/null | sed s/^/\ \|\ /`'
emojis=(🐶 🐺 🐱 🐭 🐹 🐰 🐸 🐯 🐨 🐻 🐷 🐮 🐵 🐼 🐧 🐍 🐢 🐙 🐠 🐳 🐬 🐥)
emoji='`echo ${emojis[$RANDOM % 22]}`'
PS1="\[\033[0;36m\]\T | \W$git_branch | $emoji > \[\e[0m\]"
# strip out iBooks citation
sed -E -e 's/^[ ]?[0-9]* //g' | sed -E -e 's/“[ ]?[0-9]?[ ]?//g' | sed -E -e 's/”$//g' | sed -E -e 's/^(Excerpt From).*//g'
@turboMaCk
turboMaCk / index.html
Last active August 29, 2015 14:02
D3.js Chart Library Boilerplate
<html>
<head>
<title>test</title>
</head>
<body>
<div id="mydiv"></div>
<div id="mydiv2"></div>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
@mim-Armand
mim-Armand / setinterval_extendscript_v0.01.js
Last active September 15, 2017 04:33
setinterval for adobe extend script v 0.1
main();
function main() {
var myIdleTask = app.idleTasks.add({
name: “my_idle_task”,
sleep: 1000
});
var onIdleEventListener = myIdleTask.addEventListener(IdleEvent.ON_IDLE, onIdleEventHandler, false);
}
// SETINTERVAL DOSNT EXIST SO WE USE THE ONLY POSSIBLE WAY ONIDLE EVENT:
@rjmoggach
rjmoggach / importSVGFilesAsLayers.js
Created May 30, 2014 07:07
Illustrator script to import a folder of SVG files into separate offset layers
// Import SVG Files as Layers - Illustrator CS3 script
// Description: Imports a folder of SVG files as named layers into a new document
// Author: Robert Moggach (rob@moggach.com)
// Version: 0.0.1 on 2014-05-29
function getFolder() {
return Folder.selectDialog('Please select the folder to be imported:', Folder('~'));
}
@larrybotha
larrybotha / A.markdown
Last active April 2, 2024 14:37
Export multiple artboards in Adobe Illustrator to png, or pdf

Export multiple Adobe Illustrator artboards to png, jpg, pdf

This is a reference to Matthew Ericson's article Export Illustrator Layers and/or Artboards as PNGs and PDFs in case something happens to happen to the article, and if I just forget where to find the exporter online.

Usage

  • Drop MultiExporter.js into /Applications/Adobe\ Illustrator\ CS6/Presets.localized/en_GB/Scripts
  • Restart Illustrator
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
@Arahnoid
Arahnoid / RGB-Hex.js
Last active December 27, 2022 21:32
[Convert color format] Bunch of RGB to Hex and Hex to RGB convert javascript functions what works well in Photoshop #Photoshop
///////////////////////////////////////////////////////////////////////////////////
/// Colection of RGB to HSB, HSB to RGB convert functions
/// Source: http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb
///////////////////////////////////////////////////////////////////////////////////
/**
* componentToHex convert two digit htx value to R, G or B chanel value
* @param number c value from 0 to 225
* @return string value of R, G or B chanel
* @usage //alert (componentToHex(255)); //ff
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@lifuzu
lifuzu / .gitconfig
Created March 11, 2014 17:09
Three levels of GIT config
# There are 3 levels of git config; project, global and system.
# project: Project configs are only available for the current project and stored in .git/config in the project's directory.
# global: Global configs are available for all projects for the current user and stored in ~/.gitconfig.
# system: System configs are available for all the users/projects and stored in /etc/gitconfig.
# Create a project specific config, you have to execute this under the project's directory.
$ git config user.name "John Doe"
# Create a global config