Skip to content

Instantly share code, notes, and snippets.

View semencov's full-sized avatar

Yuri Sementsov semencov

View GitHub Profile

Keybase proof

I hereby claim:

  • I am semencov on github.
  • I am smcv (https://keybase.io/smcv) on keybase.
  • I have a public key whose fingerprint is CB0C 58B0 3666 B844 05DC 46D3 A18D 5FB4 AAF1 3C9A

To claim this, I am signing this object:

const throttle = fn => {
let isRunning = false
return () => {
if (isRunning) return
isRunning = true
window.requestAnimationFrame(() => (fn(), isRunning = false))
}
}
sortedIndex = require('lodash/sortedIndex')
module.exports = class PriorityQueue
constructor: () ->
@heap = []
@length = 0
push: (item, priority=0) ->
data =
@semencov
semencov / guilloche.js
Created September 1, 2011 08:37 — forked from 3n/guilloche.js
/*
---
name: guilloche
script: guilloche.js
description: guilloche
provides: [Guilloche]
...
*/