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:
| /* | |
| I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace | |
| so it's better encapsulated. Now you can have multiple random number generators | |
| and they won't stomp all over eachother's state. | |
| If you want to use this as a substitute for Math.random(), use the random() | |
| method like so: | |
| var m = new MersenneTwister(); |
| # Set cache dir | |
| proxy_cache_path /var/cache/nginx levels=1:2 | |
| keys_zone=microcache:5m max_size=1000m; | |
| # Virtualhost/server configuration | |
| server { | |
| listen 80; | |
| server_name yourhost.domain.com; | |
| # Define cached location (may not be whole site) |
| /* jsdomtest.js: Build a pie chart using d3.js and send the result to stdout | |
| * Requires d3.js and d3.layout.js in same directory | |
| * Requires pie.js from this gist: https://gist.github.com/1509145 | |
| * ex. node jsdomtest.js > pie.svg | |
| */ | |
| var jsdom = require('jsdom'), | |
| scripts = ["file://"+__dirname+"/d3.min.js", | |
| "file://"+__dirname+"/d3.layout.min.js", | |
| "file://"+__dirname+"/pie.js"], |
| var HashHack = { | |
| PREFIX: '#hhMessage=', | |
| aCallbacks: [], | |
| sLastHash: '', | |
| handleInterval: function() { | |
| var sHash = window.location.hash, | |
| sDecodedHash, sMessage, i; | |
| if (sHash !== HashHack.sLastHash) { |
| var HashHack = { | |
| PREFIX: '#hhMessage=', | |
| postMessage: function(el, sMessage) { | |
| if ('string' === typeof el) { | |
| el = document.getElementById(el); | |
| } | |
| var sUrl = el.src.replace(/#.*/, ''); | |
| el.src = sUrl + HashHack.PREFIX + encodeURIComponent(sMessage); |
| // Interpolate between 2 colors in C# | |
| // Taken from answer by user Jason | |
| // http://stackoverflow.com/questions/1236683/color-interpolation-between-3-colors-in-net | |
| class ColorInterpolator { | |
| delegate byte ComponentSelector(Color color); | |
| static ComponentSelector _redSelector = color => color.R; | |
| static ComponentSelector _greenSelector = color => color.G; | |
| static ComponentSelector _blueSelector = color => color.B; | |
| public static Color InterpolateBetween( |
Just some kind of health bar, to test css3 animations and less css :)
A Pen by Sven Knötgen on CodePen.
A clean and simple checkout form with credit card fields, submit button and a fancy price badge.
A Pen by Atakan Goktepe on CodePen.
A ticker inspired by a similar ticker seen in an advertisement for a local furniture store in NYC.
Fully responsive using YUI Pure grids.
A Pen by Leon Taveras on CodePen.