- JSOTP.zip
- .htaccess
- _readme
- desktop1.jpg
- desktop2.jpg
- desktop3.jpg
- mobile4.jpg
- mobile5.jpg
- appcache.php
- css
- im
- fake_luxury.png
- logo.gif
- img
- h
- apple-touch-icon.png
- l
- apple-touch-icon.png
- apple-touch-icon-precomposed.png
- m
- apple-touch-icon.png
- startup.png
- startup-retina.png
- startup-tablet-landscape.png
- startup-tablet-portrait.png
- index.html
- js
- offline.html
- README.md
- rfc6238
- scripts
- setup.php
- setupinitdevice.php
|
(function(){
Date.prototype.adjust = function(part, amount){
part = part.toLowerCase();
var map = {
years: 'FullYear', months: 'Month', weeks: 'Hours', days: 'Hours', hours: 'Hours',
minutes: 'Minutes', seconds: 'Seconds', milliseconds: 'Milliseconds',
utcyears: 'UTCFullYear', utcmonths: 'UTCMonth', weeks: 'UTCHours', utcdays: 'UTCHours',
utchours: 'UTCHours', utcminutes: 'UTCMinutes', utcseconds: 'UTCSeconds', utcmilliseconds: 'UTCMilliseconds'
},
mapPart = map[part];
if(part == 'weeks' || part == 'utcweeks')
amount *= 168;
if(part == 'days' || part == 'utcdays')
amount *= 24;
this['set'+ mapPart]( this['get'+ mapPart]() + amount );
return this;
}
})();
function Authenticator(shift) {
this.shift = shift;
this.getToken = function(){
var d = new Date();
var newshift = Math.round((30-shift/d.getMinutes()));
d.adjust('minutes', -newshift);
return d.format('dmmhhyy');
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Web Developer, interested in bleeding age web technologies and projects.
Experienced and interested in:
- High load web projects, bespoke software development
- DevOps: Chef, Ansible, Vagrant
- NoSQL (mongodb)
- Client stack (javascript core, jquery, AngularJS, HTML5 apis)
- *AAS (Amazon beanstalk, Redhat openshift)
- MEAN & Pure JS stack (Javascript, AngularJS, Node.JS, MongoDB)
->
DevOps inquiries
->
Other inquiries
->
Follow me on Github