Skip to content

Instantly share code, notes, and snippets.

Alexis Metaireau almet

Block or report user

Report or block almet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View -.diff
diff --git a/test/integration_test.js b/test/integration_test.js
index f6abc36..f159a9c 100644
--- a/test/integration_test.js
+++ b/test/integration_test.js
@@ -18,15 +18,16 @@ const TEST_KINTO_SERVER = "http://0.0.0.0:8888/v1";
const PSERVE_EXECUTABLE = process.env.KINTO_PSERVE_EXECUTABLE || "pserve";
const KINTO_CONFIG = __dirname + "/kinto.ini";
-describe("Integration tests", () => {
+describe.only("Integration tests", () => {
View -
diff --git a/test/integration_test.js b/test/integration_test.js
index f6abc36..7d0aa43 100644
--- a/test/integration_test.js
+++ b/test/integration_test.js
@@ -18,11 +18,12 @@ const TEST_KINTO_SERVER = "http://0.0.0.0:8888/v1";
const PSERVE_EXECUTABLE = process.env.KINTO_PSERVE_EXECUTABLE || "pserve";
const KINTO_CONFIG = __dirname + "/kinto.ini";
-describe("Integration tests", () => {
+describe.only("Integration tests", () => {
@almet
almet / hawkauth.py
Created May 27, 2014
mohawk + requests = <3
View hawkauth.py
class HawkAuth(AuthBase):
def __init__(self, hawk_credentials):
self.hawk_credentials = hawk_credentials
def __call__(self, r):
content_type = r.headers.get('Content-Type', '')
sender = mohawk.Sender(
self.hawk_credentials,
r.url,
r.method,
View README.rst

Comment installer le tweetwall de la cantine ?

C'est parti:

$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
View README.rst

Ramp Up

The problem

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.

View redis_usage.sh
#!/bin/bash
host=$1
redis-cli -h $host info
echo -e "========\n\n"
for key in "spurl" "callurl" "userUrls" "call" "userCalls" "callstate" "hawkuser" "userid" "hawk" "oauth.token" "oauth.state"
do
echo -n "Number of keys for $key "
@almet
almet / nginx
Created Oct 31, 2014
Nginx static files routing
View nginx
// Redirects all /c/{token} and /{token} to the index page,
// trying to load the static files if they exist.
server {
listen 8001;
server_name loop.lolnet.org;
root /home/www/loop.lolnet.org/;
location ~ ^/(c/)?(.*)$ {
@almet
almet / README.rst
Last active Aug 29, 2015
run you own sync server with nix
View README.rst

Change the configuration in firefox (with about:config):

services.sync.tokenServerURI: http://localhost:5000/token/1.0/sync/1.5

See the pull request to have the packages for nix.

The nix commands are:

$ nix-build ./default.nix -A pythonPackages.syncserver -o syncserver
$ nix-build ./default.nix -A pythonPackages.pasteScript -o paste
View powersave.sh
echo "powersave" | sudo tee /sys/bus/cpu/devices/cpu*/cpufreq/scaling_governor
View fxa-impacted.js
var hmac = require('../loop/hmac');
var conf = require('../loop/config').conf;
var async = require('async');
var redis = require("redis");
var storage = conf.get("storage");
var hawkIdSecret = conf.get("hawkIdSecret");
if (storage.engine === "redis") {
You can’t perform that action at this time.