MacBook Air (MBA) Mid 2012
This file contains 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
/* jsonp.js for Protototype | |
* | |
* Copyright (c) 2009 Tobie Langel (http://tobielangel.com) | |
* | |
* jsonp.js is freely distributable under the terms of an MIT-style license. | |
*-------------------------------------------------------------------------- | |
Requires: Prototype >= 1.6 | |
Usage: | |
new Ajax.JSONRequest('http://api.flickr.com/services/feeds/photos_public.gne', { | |
onComplete: function(json) { |
This file contains 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
set :application, "SampleApp" | |
set :repository, "." | |
set :scm, :none | |
set :use_sudo, false | |
set :keep_releases, 5 | |
#Use the copy method which will compress and scp the files | |
set :deploy_via, :copy | |
set :main_js, "app.js" |
This file contains 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
# Basic benchmarks | |
# SET key val # 87489.06 | |
# SETRANGE key2 6 "Redis" # 75757.58 req/s | |
# INCR key 245 # 70224.72 req/s | |
# INCRBY key 245 22 # 67114.09 req/s | |
# EVAL SET key val # 46296.29 req/s | |
# SETIFHIGHER (set or update key if new value is higher than current) # 41666.67 req/s | |
# if not exists return OK , if updated return the increment , if not updated return 0 | |
SCRIPT LOAD "local c = tonumber(redis.call('get', KEYS[1])); if c then if tonumber(ARGV[1]) > c then redis.call('set', KEYS[1], ARGV[1]) return tonumber(ARGV[1]) - c else return 0 end else return redis.call('set', KEYS[1], ARGV[1]) end" |
To:
Their Data Protection Officer, usually dpo@companyname.com
Subject:
Request for erasure (GDPR)
This file contains 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
express = require 'express' | |
gracefullyExiting = false | |
app = express.createServer() | |
app.use (req, res, next) -> | |
return next() unless gracefullyExiting | |
res.setHeader "Connection", "close" | |
res.send 502, "Server is in the process of restarting." |
This file contains 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
<?php | |
/** | |
* Validate JSONP Callback | |
* | |
* https://github.com/tav/scripts/blob/master/validate_jsonp.py | |
* https://github.com/talis/jsonp-validator/blob/master/src/main/java/com/talis/jsonp/JsonpCallbackValidator.java | |
* http://tav.espians.com/sanitising-jsonp-callback-identifiers-for-security.html | |
* http://news.ycombinator.com/item?id=809291 | |
* |
This file contains 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
// * iOS zooms on form element focus. This script prevents that behavior. | |
// * <meta name="viewport" content="width=device-width,initial-scale=1"> | |
// If you dynamically add a maximum-scale where no default exists, | |
// the value persists on the page even after removed from viewport.content. | |
// So if no maximum-scale is set, adds maximum-scale=10 on blur. | |
// If maximum-scale is set, reuses that original value. | |
// * <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=2.0,maximum-scale=1.0"> | |
// second maximum-scale declaration will take precedence. | |
// * Will respect original maximum-scale, if set. | |
// * Works with int or float scale values. |
This file contains 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
if (-f $document_root/system/maintenance.html) { | |
return 503; | |
} | |
error_page 503 @maintenance; | |
location @maintenance { | |
internal; | |
if ($http_accept ~ json) { | |
return 503 "{}"; | |
} |
This file contains 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
/** | |
* Process an array of data synchronously. | |
* | |
* @param data An array of data. | |
* @param processData A function that processes an item of data. | |
* Signature: function(item, i, callback), where {@code item} is the i'th item, | |
* {@code i} is the loop index value and {@code calback} is the | |
* parameterless function to call on completion of processing an item. | |
*/ | |
function doSynchronousLoop(data, processData, done) { |
OlderNewer