Skip to content

Instantly share code, notes, and snippets.

View thomwiggers's full-sized avatar

Thom Wiggers thomwiggers

View GitHub Profile
@thomwiggers
thomwiggers / abnamro.py
Created September 8, 2022 12:08
Convert ABN AMRO "XLS" format to extract some useful fields
import re
import csv
fieldnames = [
"Rekeningnummer",
"Muntsoort",
"Transactiedatum",
"Rentedatum",
"Beginsaldo",
"Eindsaldo",
@thomwiggers
thomwiggers / download.py
Created January 28, 2022 20:11
Extract slack emoji
import json
import time
import requests
# Go to the add emoji page on the Slack website for your team
# ie. https://team.slack.com/customize/emoji
# Open the web console, go to the networking tab, find the request to emoji.adminList (it's an ajax request)
# Right-click -> copy as cURL
# Edit cURL command such that the pagination requests more emoji than your team has
# Save as emoji.json in same folder as this script
[
{
"key": "ntrulpr653",
"value": {
"x86_64": {
"": {
"keygen": 32555.33,
"keygencycles": 76653,
"encaps": 30546,
"encapscycles": 81690,
@thomwiggers
thomwiggers / namespaceize.sh
Created June 7, 2021 10:33
script to do namespacing
#!/bin/bash
PREFIX="PQCLEAN_NTRUHPS2048509_AVX2_"
for symbol in $(nm -g lib*.a | grep -E ' (T|R) ' | cut -f3 -d' '); do
if [[ $symbol = $PREFIX* ]]; then
echo Already done $symbol
elif [[ $symbol = Keccak* ]]; then
echo "Don't need to do $symbol"
else
@thomwiggers
thomwiggers / test_kem.c
Created May 3, 2021 15:45
modified multiprocess version of test_kem.c with nistdrbg
// SPDX-License-Identifier: MIT
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <oqs/oqs.h>
#include <sys/random.h>
#define int32_MINMAX(a,b) \
do { \
int32 temp1; \
asm( \
"cmpl %1,%0\n\t" \
"mov %0,%2\n\t" \
"cmovg %1,%0\n\t" \
"cmovg %2,%1\n\t" \
: "+r"(a), "+r"(b), "=r"(temp1) \
: \
Start: 2019-11-11T19:29:50+0100
HOST: archeron Loss% Snt Last Avg Best Wrst StDev
1.|-- _gateway 0.0% 50 0.8 0.7 0.2 1.2 0.2
2.|-- 2a01:4f8::a:23:a 0.0% 50 1.2 1.3 0.5 7.4 1.1
3.|-- 2a01:4f8:0:3::345 0.0% 50 1.4 2.3 0.6 41.1 6.2
4.|-- juniper5.nbg1.hetzner.com 0.0% 50 3.6 3.9 2.7 12.7 1.4
5.|-- 2a01:4a0:1338:80::1 0.0% 50 3.6 4.5 2.9 13.1 1.9
6.|-- ae3-2011.nbg30.core-backb 0.0% 50 3.5 4.7 3.1 13.6 2.2
7.|-- ae1-2001.fra10.core-backb 0.0% 50 7.8 7.0 5.7 21.5 2.3
8.|-- de-fra01b-ri2-ae5-0.v6.ao 0.0% 50 6.4 7.9 5.7 25.8 3.6
my_namespaced_setup() {
local bla=3
export bar=342
}
my_namespaced_setup
unset -f my_namespaced_setup
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Noto Color Emoji</family>
</prefer>
</alias>
<alias>
[[runners]]
name = "Cluster"
url = "https://gitlab.com/"
token = ""
executor = "docker+machine"
[runners.docker]
tls_verify = false
image = "python:3.6"
privileged = true
disable_cache = true