Skip to content

Instantly share code, notes, and snippets.

View jrmedd's full-sized avatar

James Medd jrmedd

View GitHub Profile
#!/bin/sh
# A simple script to shrink a image of unwanted free space.
# This is a Beerware release
# If you like it, Buy your Buddy a Beer
# If not, recycle it nicely so it may R.I.P.
# Have A Great Day
# ShorTie <ShorTie@idiot.com>
> serialport-builds-electron@4.0.7 install /private/var/folders/25/1s5nwbhn4_sd_3w9bq552m8h0000gn/T/apm-install-dir-118424-4078-1ru63ba.6nsei885mi/node_modules/arduino-upload/node_modules/serialport-builds-electron
> node-pre-gyp install --fallback-to-build
Failed to execute '/Applications/Atom.app/Contents/Resources/app/apm/bin/node /Applications/Atom.app/Contents/Resources/app/apm/bin/../node_modules/.bin/node-gyp configure --fallback-to-build --module=/private/var/folders/25/1s5nwbhn4_sd_3w9bq552m8h0000gn/T/apm-install-dir-118424-4078-1ru63ba.6nsei885mi/node_modules/arduino-upload/node_modules/serialport-builds-electron/build/Release/serialport.node --module_name=serialport --module_path=/private/var/folders/25/1s5nwbhn4_sd_3w9bq552m8h0000gn/T/apm-install-dir-118424-4078-1ru63ba.6nsei885mi/node_modules/arduino-upload/node_modules/serialport-builds-electron/build/Release --python=/Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh' (1)
/private/var/folders/25/1s5nwbhn4_sd_3w9bq552m8
@jrmedd
jrmedd / createICNS.sh
Last active July 17, 2017 13:48 — forked from sergeysova/generate-icns-from-svg.sh
Generate icns from iconset
#!/bin/bash
# ICNS from PNG
if [[ ! $2 ]]; then
cat<<EOF
Usage:
${0##*/} <input png e.g. "source.png"> <output name e.g. "MyApp">
EOF
exit 1
#include <Bounce2.h>
#include "MIDIUSB.h"
int numButtons = 8;
int lowButton = 2;
int buttonPin = 3;
Bounce bouncer[8] = {
Bounce(2, 5),
Bounce(3, 5),
var t;
function idleOut() {
window.location = 'index.html';
}
function resetTimer() {
console.log("Reset");
clearTimeout(t);
t = setTimeout(idleOut, 10000)
}
document.onmousemove = resetTimer;
//wait a second and select the first tw-link on the page
jQuery(document).ready(function() {
setTimeout(function(){jQuery('tw-expression tw-link:first').focus()}, 1000);
});
//select tw-story node
var target = document.getElementsByTagName("tw-story")[0];
// create an observer instance, get it to execute a function whenever tw-story changes (i.e. when the user interacts)
var observer = new MutationObserver(function(mutations) {
setTimeout(function() {
var internalLinks = document.getElementsByClassName('internalLink');
for (var i = 0; i < internalLinks.length; i ++) {
internalLinks[i].href = "#";
}
internalLinks[0].focus();
var target = document.getElementById("passages");
var observer = new MutationObserver(function(mutations) {
console.log("Change");
setTimeout(function() {
@jrmedd
jrmedd / awkward_arduino_fastest_finger.ino
Last active November 29, 2018 01:00
Code for Awkward Arduino workshop – fastest finger.
/*
AWKWARD ARDUINO – FASTEST FINGER
*/
/*
We're going to connect LEDs to pins 3, 4, and 5.
These will act as winning lightts for the green
and blue team, and the red light that tells you
when to press!
*/
/*
LOAD THIS SCRIPT AFTER THE MAIN TWINE ENGINE
*/
function keySelectOption(inputs) {
for (var i=0; i<inputs.length; i++) {
document.onkeydown = function(e) {
var option = document.activeElement;
if (e.keyCode==40) {
var node = option.nextSibling;
while (node) {