Skip to content

Instantly share code, notes, and snippets.

View dpino's full-sized avatar
🏠
Working from home

Diego Pino dpino

🏠
Working from home
View GitHub Profile
@dpino
dpino / build_bots_status.py
Created March 12, 2019 14:10
WPE & GTK WebKit build bots status
#!/usr/bin/env python
import urllib
import json
from urllib2 import urlopen
bots_names = [
"WPE Linux 64-bit Release (Build)",
"WPE Linux 64-bit Debug (Build)",
@dpino
dpino / modulo.lua
Created January 4, 2019 12:09
Microbenchmark for LuaJIT's modulo operations
local C = ffi.C
function fold(fn, times)
local now = os.clock()
for i=1,times do
fn()
end
return os.clock() - now
end
@dpino
dpino / snakecoin-server-full-code.py
Last active January 4, 2019 03:19 — forked from aunyks/snakecoin-server-full-code.py
The code in this gist isn't as succinct as I'd like it to be. Please bare with me and ask plenty of questions that you may have about it.
#!/usr/bin/env python
# Source https://gist.github.com/aunyks/47d157f8bc7d1829a729c2a6a919c173
# Modifications:
# - Can pass port number as command line argument.
# - Added GET method /add_peer.
# - On retrieving blockchain, call consensus to synchronize with other peers.
# - On updating the current blockchain from a peers' blockchain, convert list
# of JSON blocks to native Block objects.
@dpino
dpino / run-all.sh
Last active January 28, 2018 18:36
#!/usr/bin/env bash
FOLDERS=(
built-ins
annexB
intl402
language
)
for each in ${FOLDERS[@]}; do
#!/usr/bin/env perl
# Reads out a web-platform-test run output and prints out a report were errors
# are grouped by text message and list of files. Reports also on total number
# of distinct errors and total number of failing files.
# Arguments:
# Agent: Actual the head of the string containing the test name. The rest of
# the string should the filename.
# Errorfile: web-platform-test output of a ./wpt run.
@dpino
dpino / wpt-run-report.pl
Last active January 16, 2018 16:02
Parses web-platform-test output and groups results by error message and list of files
#!/usr/bin/env perl
# Reads out a web-platform-test run output and prints out a report were errors
# are grouped by text message and list of files. Reports also on total number
# of distinct errors and total number of failing files.
# Arguments:
# Agent: Actual the head of the string containing the test name. The rest of
# the string should the filename.
# Errorfile: web-platform-test output of a ./wpt run.
@dpino
dpino / iframe-as-worker.html
Created October 24, 2017 17:31
Using an iframe as a worker
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<iframe id="w0" src="iframe2.html" style="display: none"></iframe>
$ git log -1
commit 9856da7802247e70ba7410666d0048fc7a1e2f07
Author: Diego Pino Garcia <dpino@igalia.com>
Date: Thu Oct 27 14:48:40 2016 +0000
Add unit test for ipv6_cache_trigger
TEST core.timer
TEST core.counter
TEST core.lib
commit db2e4369522aee5ec2ee2ec8391ac1d0bd7be7d8
Author: Diego Pino Garcia <dpino@igalia.com>
Date: Thu Oct 27 16:15:30 2016 +0200
Rename snabb-lwaftr to snabbvmx in Makefile
DIR obj/testlog
TEST lib.pmu
SKIPPED testlog/lib.pmu
TEST lib.numa
$ git log -1
commit faa32bfcacda682f19bdfabc5721fef3e3972a97
Author: Diego Pino Garcia <dpino@igalia.com>
Date: Thu Oct 27 13:32:26 2016 +0200
Add image
TEST core.timer
TEST core.counter
TEST core.lib