Skip to content

Instantly share code, notes, and snippets.

View bassosimone's full-sized avatar
🎯
Focusing

Simone Basso bassosimone

🎯
Focusing
View GitHub Profile
[
{
"ta": {
"inputs": [
"https://www.reddit.com/",
"https://a.thumbs.redditmedia.com/robots.txt",
"https://styles.redditmedia.com/robots.txt",
"https://preview.redd.it/robots.txt",
"https://www.redditstatic.com/robots.txt",
"https://v.redd.it/robots.txt",
{
"annotations": {
"architecture": "amd64",
"engine_name": "ooniprobe-engine",
"engine_version": "3.14.0-alpha",
"platform": "linux"
},
"data_format_version": "0.2.0",
"input": "http://example.com",
"measurement_start_time": "2022-01-19 18:11:52",
<!doctype html>
<html lang='en'>
<head><meta charset='utf-8'><title>ndt7</title></head>
<body><script type='text/javascript'>
/* jshint esversion: 6, asi: true */
console.log('creating the downloader')
let downloader = new Worker('ndt7-minimal.js')
downloader.postMessage({
url: window.location.href,
subtest: 'download',
diff --git a/www/index.html b/www/index.html
index 1aafce9..648bcd8 100644
--- a/www/index.html
+++ b/www/index.html
@@ -32,6 +32,11 @@
/* exported Run */
/* globals libndt7 */
+ function MaybeHostname() {
+ const url = new URL(window.location.href)
@bassosimone
bassosimone / single-convenience-lib.diff
Last active March 15, 2018 10:27
Compile tor using libtool
From bceafcbe1dce3af6707a7f02ade077860356d4a6 Mon Sep 17 00:00:00 2001
From: Simone Basso <bassosimone@gmail.com>
Date: Thu, 15 Mar 2018 11:26:03 +0100
Subject: [PATCH 2/2] build system: make single convenience library
---
.gitignore | 1 +
src/or/include.am | 13 +++++++++++++
2 files changed, 14 insertions(+)
// make templates work in Visual Studio
// xref: https://github.com/measurement-kit/measurement-kit/pull/1536
#include <stdlib.h>
#include <time.h>
#include <iostream>
// experiment with several combinations of modifiers
#if 1
#include <map>
#include <string>
int main() {
std::map<std::string, std::string> map;
auto x = map.at("foo");
}
/*
* robotMaze.js
*
* The blue key is inside a labyrinth, and extracting
* it will not be easy.
*
* It's a good thing that you're a AI expert, or
* we would have to leave empty-handed.
*/
mk_runtime = (function ()
local self = {}
self.coroutines = {}
self.async = function (func)
self.coroutines[coroutine.create(func)] = {
status = "running",
func = func
}
@bassosimone
bassosimone / relight_script_example.cpp
Created November 17, 2015 10:30
Relight script example
Var<Stream> stream(new Stream(poller));
poller->run([=](std::function<void(std::function<void()>)> stop) {
std::function<void()> cleanup = [=]() {
poller->break_loop();
stream->close();
};
stream->connect_ipv4("127.0.0.1", 8080, [=]() {
stream->on_data([=](Var<Bytes>) {
stream->on_flush([=]() {
stream->write("flushed\n");