Skip to content

Instantly share code, notes, and snippets.

solso /
Last active Apr 1, 2020
Potential Improvements of Bluetooth Contact Tracing

Potential Improvements of Bluetooth Contact Tracing


Contact tracing is a key factor for containment on epidemics. Multiple apps are attempting to do this via storing bluetooth proximity contacts on the device. For instance,

solso /
Last active Dec 6, 2019
Human Web Overview

Human Web Overview

Konark Modi, Alex Catarineu, Philipp Claßen and Josep M. Pujol at Cliqz *München, October 2016

[edited on October 2017]*

[edited on September 2019 to fix broken links and add reference to HPN paper]*

We recommend to read the article on Cliqz Tech blog, the content is more up to date there. Not removing this gist for historical reasons. December 2019.

solso / router.lua
Created Jun 12, 2013
router in lua
View router.lua
inspect = require "inspect"
services = {
list = {
leaf = true,
callback = function(params) for k, v in pairs(params) do print("key: " .. k .. " value: " .. v) end end
View api-aggregator-positive-word.lua
User script that returns the word with highest positive emotional value.
It runs against the SentimentAPI REST AP. See blog entry for the full details.
return function()
local max_sentiment = 5
local params = ngx.req.get_query_args()
solso / get_query_args_extended.lua
Created Apr 11, 2013
extract nested params on query_string
View get_query_args_extended.lua
function get_query_args_extended()
args = ngx.req.get_query_args()
for k, v in pairs(args) do
t = {}
for k2 in string.gmatch(k, "%b[]") do
if #t > 0 then
-- it has nested params, needs to be transformed
first = string.sub(k,1,string.find(k,"%[")-1)
View example_account_info.rb
def api_call_account_read(domain, provider_key, account_id)
url = "https://#{domain}/admin/api/accounts/#{account_id}.xml?provider_key=#{provider_key}"
response = RestClient.get url
raise"Wrong response code (#{response.code}) in request #{url}") if response.code!=200
document = Nokogiri::XML(response.to_str)
account =
account["email"] = document.xpath("//users/user/email").text
solso /
Created Jul 26, 2012
Support material for blog post of redis replication
## --- tunnel_to_master_redis
solso / sentiment_api.rb
Created May 9, 2012
Active Docs for the Sentiment API (based on the Swagger specification)
View sentiment_api.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
require 'sinatra'
require './analyzer.rb'
class SentimentApi < Sinatra::Base
disable :logging
disable :raise_errors
disable :show_exceptions
solso / gist:1901280
Created Feb 24, 2012
Example of varnish configuration for 3scale, proxy only
View gist:1901280
# This is a the VCL configuration file for 3scale's varnish plugin.
# Default backend definition. Set this to point to the 3scale's
# backend.
# set the beresp.ttl in vcl_fetch to have a default global TTL
# you can define custom TTL via regular expresions
## the backend of your API