Skip to content

Instantly share code, notes, and snippets.

@waterjump
waterjump / custom-wave-shaper.js
Last active April 15, 2022 18:27
Custom wave shaper node curve
// Creates a curve that goes from -1, -1 to 1, 0.
const makeLfoAmpCurve = function() {
let n_samples = 44100;
let curve = new Float32Array(n_samples)
let i = 0;
for ( ; i < n_samples; ++i ) {
curve[i] = i / (n_samples - 1) - 1;
}
return curve;
};
@waterjump
waterjump / remine-kanban-bookmarklet.js
Last active June 6, 2018 14:23
Redmine Kanban Group WIP limit bookmarklet
javascript: (function() {
var getAmount = function($element) {
return Number($element.first().find('.count').text().split('/')[0]);
};
var brkActive, brkDone, brkTotal, $breakdown;
var impActive, impDone, impTotal, $implement;
var rvwActive, rvwDone, rvwTotal, $review;
brkActive = getAmount($('th[data-column-id=12]'));
brkDone = getAmount($('th[data-column-id=15]'));
@waterjump
waterjump / .rubocop.yml
Created May 24, 2017 12:24
Rubocop configuration (save in project root)
AllCops:
DisabledByDefault: true
#################### Lint ################################
Lint/AmbiguousOperator:
Description: >-
Checks for ambiguous operators in the first argument of a
method invocation without parentheses.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'

Keybase proof

I hereby claim:

  • I am waterjump on github.
  • I am sponsormetape (https://keybase.io/sponsormetape) on keybase.
  • I have a public key ASDwKPh3g_WzIQ7SLyQ3yEawQ-DLG_ki63io91qYOeMULAo

To claim this, I am signing this object:

@waterjump
waterjump / memoryLeak.coffee
Last active March 23, 2017 13:46
Recursive AJAX call to facebook
myp = new p5 # http://p5js.org/reference/
App = {}
App.setupPlayer = (json) ->
# do stuff
window.test = ->
myp.httpGet(
'https://graph.facebook.com/v2.8/me?fields=live_videos.limit(1)%7Bstatus%2Ccomments%7D&access_token=XXXXXXXXXXXXXXXXXXX',