This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Show a notice when Mac's stupid scroll happens | |
* http://micho.biz/mac-osx-lion-horizontal-scroll-event/ | |
*/ | |
Global.preventStupidMacScroll = function () { | |
var self = this, | |
broken_browser = navigator.userAgent.match(/Macintosh/), | |
hide = Teambox.models.user.get('settings').hide_scroll_notice; | |
if (!broken_browser || hide) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run the function as soon as it's called, but prevent further calls during `delay` ms | |
// Example: function.throttle(200) will only run function() once every 200 ms. | |
// Useful, for example, to avoid constant processing while typing in a live search box. | |
Function.prototype.throttle = function(delay) { | |
var fn = this | |
return function() { | |
var now = (new Date).getTime() | |
if (!fn.lastExecuted || fn.lastExecuted + delay < now) { | |
fn.lastExecuted = now | |
fn.apply(fn, arguments) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First, install nginx for mac with "brew install nginx". | |
Then follow homebrew's instructions to know where the config file is. | |
1. To use https you will need a self-signed certificate: https://devcenter.heroku.com/articles/ssl-certificate-self | |
2. Copy it somewhere (use full path in the example below for server.* files) | |
3. sudo nginx -s reload | |
4. Access https://localhost/ | |
Edit /usr/local/etc/nginx/nginx.conf: |
OlderNewer