This list served quite some people but someone else did a better job since.
Go to https://github.com/umpirsky/country-list for a list in your language and format.
I've also compiled a list of nationalities
This list served quite some people but someone else did a better job since.
Go to https://github.com/umpirsky/country-list for a list in your language and format.
I've also compiled a list of nationalities
/* | |
* node-ws - pure Javascript WebSockets server | |
* Copyright Bradley Wright <brad@intranation.com> | |
*/ | |
// Use strict compilation rules - we're not animals | |
'use strict'; | |
var net = require('net'), | |
crypto = require('crypto'); |
(function($) { | |
$.postJSON = function(url, data, success, dataType) { | |
if (typeof data != 'string') { | |
data = JSON.stringify(data); | |
} | |
$.ajax({ | |
url : url, | |
type: "post", | |
data: data, | |
dataType: dataType || "json", |
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
function retry(isDone, next) { | |
var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false; | |
var id = window.setInterval( | |
function() { | |
if (isDone()) { | |
window.clearInterval(id); | |
next(is_timeout); | |
} | |
if (current_trial++ > max_retry) { | |
window.clearInterval(id); |
<?php | |
/* Usage Example | |
$save_handler = new MyRedisSessionModule(); | |
$save_handler->save_path = "tcp://127.0.0.1:6379?weight=1"; | |
session_set_save_handler($save_handler, true); | |
*/ | |
class MyRedisSessionModule implements SessionHandlerInterface { | |
/** |
function saveRecord(record, args, cb) { | |
record.save(function(e) { | |
if (e && e.message == "VersionError: No matching document found.") { | |
recordModel.findById(record._id, function(e, newRecord) { | |
if(e) return cb(e); | |
reSaveRecord(record, newRecord, cb); | |
}); | |
} |
var express = require('express'), | |
app = express(), | |
cookieParser = require('cookie-parser'), | |
session = require('express-session'), | |
RedisStore = require('connect-redis')(session); | |
app.use(express.static(__dirname + '/public')); | |
app.use(function(req, res, next) { | |
if (~req.url.indexOf('favicon')) | |
return res.send(404); |
/** | |
* A mixin which helps you to add depth to elements according to the Google Material Design spec: | |
* http://www.google.com/design/spec/layout/layout-principles.html#layout-principles-dimensionality | |
* | |
* Please note that the values given in the specification cannot be used as is. To create the same visual experience | |
* the blur parameter has to be doubled. | |
* | |
* Adapted from a LESS version at https://medium.com/@Florian/freebie-google-material-design-shadow-helper-2a0501295a2d | |
* | |
* Original Author: Florian Kutschera (@gefangenimnetz), Conceptboard GmbH (@conceptboardapp) |