The idea of the ramp up is to have a scalable way to activate a software feature slowly so that the scale is handled.
If you have let say 10 million users and you want to launch a most wanted feature.
# From http://snippet.gabory.fr/snippet/9/ | |
# Similar to `cut -d ":" -f 1 | sort | uniq -c | sort -n` | |
# | |
# Usage: flake8 venv | python cutfdu.py | |
# Mock : flake8 venv | cut -d ":" -f 1 | sort | uniq -c | sort -n | |
# | |
# From Natim with love (2014-02-14) | |
import itertools | |
import sys |
import hashlib | |
import sys | |
from uuid import UUID | |
text = sys.stdin.read() | |
print UUID(hashlib.sha256(text).hexdigest()[:32]) |
import asyncio | |
import aiohttp | |
def fetch_page(url, idx, num): | |
# Num per client | |
for i in range(num): | |
response = yield from aiohttp.request('GET', url) | |
if response.status == 200: |
"""Delete all your couchdb database matching a pattern.""" | |
import requests | |
import urllib | |
for db in requests.get("http://localhost:5984/_all_dbs").json(): | |
print db, | |
if db.startswith("couchdb"): | |
print "DELETE", | |
r = requests.delete("http://localhost:5984/%s" % urllib.quote_plus(db)) | |
r.raise_for_status() |
function startFxAOauthDance(host, options) { | |
if (host === undefined) { | |
throw new Error("You should provide a host."); | |
} | |
if (options === undefined || options.redirect_uri === undefined) { | |
throw new Error("You should provide a options.redirect_uri parameter."); | |
} | |
return request({ |
One of the problem when doing full HTML5 apps is the Authentication.
With Firefox Account, the OAuth dance implies a server. Here are some tips that we are using to provide the Oauth token to the client app after the Oauth dance.
I hereby claim:
To claim this, I am signing this object:
var dgram = require('dgram'); | |
var socket = dgram.createSocket('udp4'); | |
//var testMessage = "[hello world] pid: " + process.pid; | |
var message = new Buffer([0x65, | |
'I', 'P', 'A', 'D', 0x00, | |
'N','A', 'M', 'E', 0x00, | |
'J', 'S', 'O', 'N', 0x00, | |
'V', 'E', 'R', 'S', 0x00, | |
'U', 'U', 'I', 'D', 0x00, |
Option Explicit | |
Dim History As New Collection | |
Private Sub Workbook_SheetActivate(ByVal Sh As Object) | |
Dim wksht As Worksheet | |
Set wksht = Sh | |
History.Add wksht | |
If History.Count > 10 Then History.Remove 1 | |
End Sub |