This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Work In Progress</title> | |
<link rel="stylesheet" href="style.css" /> | |
</head> | |
<body> | |
<div id="container" class="v-center"> | |
<header class="text-center"> |
This file contains hidden or 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
it('should set the offer to accepted when a carrier accepts on a drivers behalf', function (done){ | |
new StateImporter('offers', 'accept', function () { | |
models.user.findOne({_type : 'Driver'}, function (driver) { | |
models.offer.findOne({}, function (offer) { | |
var accept_offer = function (callback) { | |
request.put('/api/1/offers/accept') | |
.send({driver_id : driver._id, offer_id : offer._id, accept : 'true', by_proxy : 'true'}) | |
.end(function(err, res) { | |
callback(null, res.body.jobs); | |
}); |
This file contains hidden or 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
#config pipe - KByte/s or MByte/s | |
sudo ipfwpipe 1 config bw 1MByte/s | |
#add pipe to port | |
sudo ipfw add 1 pipe 1 src-port 3000 | |
#delete when finished | |
sudo ipfw delete 1 |
This file contains hidden or 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
/********************* | |
RETINA DETECT & IMG REPLACEMENT | |
*********************/ | |
Modernizr.addTest('highresdisplay', function(){ | |
if (window.matchMedia) { | |
var mq = window.matchMedia("only screen and (-moz-min-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)"); | |
if(mq && mq.matches) { | |
return true; | |
} else { | |
return false; |
This file contains hidden or 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
var keycode = 27; //ESC key | |
$(document).keypress(function(e) { | |
if (e.which == keycode) { | |
//do stuff | |
} | |
}); | |
//or, for ESC key | |
$(document).keyup(function(e) { |
This file contains hidden or 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
$('html, body').animate({ | |
scrollTop: $("#elementID").offset().top | |
}, 2000); |