Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| /* Use this to cause a function to fire no more than once every 'ms' milliseconds. | |
| For example, an expensive mousemove handler: | |
| $('body').mouseover(ratelimit(function(ev) { | |
| // ... | |
| }, 250)); | |
| */ | |
| function ratelimit(fn, ms) { | |
| var last = (new Date()).getTime(); |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)