Skip to content

Instantly share code, notes, and snippets.

@howiemnet
howiemnet / DAWmidi.py
Created May 29, 2019 10:39
Houdini control from a Behringer X-Touch One using pygame
# h's super dodgy, super-hacky MIDI controller for Houdini code
#
# Designed to get a Behringer X-Touch One controller to control Houdini
# while feeding back current frame and status to the lights and readouts
# on the controller. Super cool.
#
# But this really, really, shouldn't be public. My Python-fu is a little raw.
# But it may give someone a useful starting point...
@axani
axani / Run pythonscript in current iTerm window
Created June 29, 2015 15:46
CodeKit Hook: Run Python in current iTerm window
-- CodeKit -> Hooks: Run the following "Apple Script"
tell application "iTerm"
tell the current terminal
activate current session
tell the last session
write text "python \"path to/pythonscript.py\""
end tell
end tell
end tell
@jiaaro
jiaaro / hotkey_helpers.js
Last active February 27, 2023 22:01
Mac Automation – Javascript (JSX) Hotkey helpers
// How to use:
// 1. Open "Script Editor" (requires OS X 10.10 Yosemite)
// 2. Change the language from "AppleScript" to "JavaScript"
// 3. Paste the code below and replace the safari example.
//
// More info:
// https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/index.html
var sys_events = Application("System Events");
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@andrewburgess
andrewburgess / bootstrap-infiniteScroll.js
Last active January 24, 2024 23:49
Twitter Bootstrap plugin that enables infinite scrolling
/* ============================================
* bootstrap-infiniteScroll.js
* ============================================ */
!function ($) {
'use strict';
var InfiniteScroll = function (el, options) {
this.$element = $(el);
this.$data = $(el).data();
this.$options = options;
@ucavus
ucavus / shake.js
Last active November 18, 2018 14:18 — forked from leecrossley/shake.js
Detect shake gestures in Cordova (Phonegap).
/*
The only required option is the "success" callback. Usage:
var shake = new Shake({
frequency: 300, //milliseconds between polls for accelerometer data.
waitBetweenShakes: 1000, //milliseconds to wait before watching for more shake events.
threshold: 12, //how hard the shake has to be to register.
success: function(magnitude, accelerationDelta, timestamp) {}, //callback when shake is detected. "this" will be the "shake" object.
failure: function() {}, //callback when watching/getting acceleration fails. "this" will be the "shake" object.
});
@leecrossley
leecrossley / shake.js
Last active December 28, 2021 10:56
Shake gesture detection in PhoneGap / Cordova
/*
THIS GIST IS OUT OF DATE AND NOT MONITORED
PLEASE SEE https://github.com/leecrossley/cordova-plugin-shake-detection
*/
var shake = (function () {
var shake = {},
watchId = null,
options = { frequency: 300 },
previousAcceleration = { x: null, y: null, z: null },