Skip to content

Instantly share code, notes, and snippets.

PRESSURE PALS!
BOTTOM 2 ROWS OF GRID: PRESS TO
ACTIVATE COLUMN
TOP 4 ROWS OF GRID: PRESS IN
COLUMN TO ACTIVATE THAT VALUE
FOR EDITING
ROWS 5-6 OF GRID: NUDGE VALUE UP/
DOWN FOR COLUMN
@misuba
misuba / CVdinner.tty
Last active January 26, 2018 00:32
a lo-fi CV-looper scene for Teletype
# 60 ms = like 3.8 sec of reasonably fine-grained recording
# X is quasi-bitwise storing are-we-recording for lanes 1-2
# (0 = neither, 1 = lane 1, 2 = lane 2, 3 = both)
# Y is same for lanes 3-4
# Z is flagging the lane for script 5 to pass the recording action off to script 6
# this version is for TXi's 4 CV inputs.
# I expect we can make a port for plain TT, as long as you're OK with no more than
# 2 lanes recording at a time, and with one of them to always record the param knob.
@misuba
misuba / loiterer.js
Created January 21, 2015 19:20
React bridge for Google Hangouts API - requires Immutable
var Loiterer = function(toplevel, dest) {
this.toplevel = React.createFactory(toplevel);
this.dest = dest;
this.atom = Immutable.Map();
this.messages = Immutable.List();
gapi.hangout.data.onStateChanged.add(this.recvState.bind(this));
gapi.hangout.data.onMessageReceived.add(this.recvMessage.bind(this));
this.redraw();
h1, h2, h3, h4, h5, h6, p, ol, ul, dl, code, pre, .icon--mention, .icon--mention-direct, table, legend, .form__actions, .form__label, .flag-group, .avatar__actions, .postbar, .comment__actions, .comment__body, .wtf, .toolbar__group a, .authentication__login, .post, .notification, .login-btn, .logout-btn, .bio__counter, .editor {
font-size: 1rem;
}
html, em, i, .icon--mention, .icon--mention-direct, .system-post h4, strong, b {
font-family: 'serif';
}
.btn, .authentication__form input[type="submit"], .btn--inverted, .search__filters button, .btn--transparent, .btn--light, .modal__backdrop .dialog__close, .delete__dialog button, .block-user__dialog button, .btn--outlined, .btn--ico, .btn--tab, .friend-noise-group button, .preference input[type="radio"] + label {
font-size: 1rem;
@misuba
misuba / viewplus.coffee
Created June 5, 2012 23:58
some Backbone.View extensions I'm pretty sure I will never not want
ViewPlus = Backbone.View.extend
initialize: (opts) ->
@init opts if @init?
if opts.partials?
Handlebars.registerPartial vuname, vu for vu, vuname in opts.partials
@_compiledTemplate = Handlebars.compile @template
render: ->
@beforeRender() if @beforeRender?
theElm = @_compiledTemplate @model.toJSON()
CmdUtils.CreateCommand({
name: "lazy-link",
takes: {text: noun_arb_text},
description: "Links some text to its top hit in Google.",
_firsthit: null,
_linkFor: function(recordObj) {
return "<a href='" + recordObj.unescapedUrl + "'>" + recordObj.titleNoFormatting + "</a>";