For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
| /* 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(); |
| var performance = (function () { | |
| var my = {}; | |
| // Wrap a function body in this to return a copy that instruments itself | |
| // If you want this to be useful, you should give your profiled function a name, | |
| // otherwise it will be identified as "", which is less than useful. | |
| my.profile = function (func) { | |
| return function () { | |
| var start = new Date().getTime(), | |
| time, |
| /*! | |
| * jQuery TextChange Plugin | |
| * http://www.zurb.com/playground/jquery-text-change-custom-event | |
| * | |
| * Copyright 2010, ZURB | |
| * Released under the MIT License | |
| */ | |
| (function ($) { | |
| $.event.special.textchange = { |
| /* | |
| natcompare.js -- Perform 'natural order' comparisons of strings in JavaScript. | |
| Copyright (C) 2005 by SCK-CEN (Belgian Nucleair Research Centre) | |
| Written by Kristof Coomans <kristof[dot]coomans[at]sckcen[dot]be> | |
| Based on the Java version by Pierre-Luc Paour, of which this is more or less a straight conversion. | |
| Copyright (C) 2003 by Pierre-Luc Paour <natorder@paour.com> | |
| The Java version was based on the C version by Martin Pool. | |
| Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au> |
| // includes bindings for fetching/fetched | |
| PaginatedCollection = Backbone.Collection.extend({ | |
| initialize: function() { | |
| _.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
| this.page = 1; | |
| }, | |
| fetch: function(options) { | |
| options || (options = {}); | |
| this.trigger("fetching"); |
| /** | |
| * Annoying.js - How to be an asshole to your users | |
| * | |
| * DO NOT EVER, EVER USE THIS. | |
| * | |
| * Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com) | |
| * Visit https://gist.github.com/767982 for more information and changelogs. | |
| * Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog | |
| * Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors | |
| * |
| #! /bin/sh | |
| # ================================================================== | |
| # ______ __ _____ | |
| # /_ __/___ ____ ___ _________ _/ /_ /__ / | |
| # / / / __ \/ __ `__ \/ ___/ __ `/ __/ / / | |
| # / / / /_/ / / / / / / /__/ /_/ / /_ / / | |
| #/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/ | |
| # Multi-instance Apache Tomcat installation with a focus | |
| # on best-practices as defined by Apache, SpringSource, and MuleSoft |
| var MyView; | |
| var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { | |
| for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } | |
| function ctor() { this.constructor = child; } | |
| ctor.prototype = parent.prototype; | |
| child.prototype = new ctor; | |
| child.__super__ = parent.prototype; | |
| return child; | |
| }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __slice = Array.prototype.slice; | |
| MyView = (function() { |
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik M枚ller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |