Skip to content

Instantly share code, notes, and snippets.

View fuglede's full-sized avatar
🥔

Søren Fuglede Jørgensen fuglede

🥔
View GitHub Profile
@fuglede
fuglede / output
Last active July 17, 2020 10:13
decibyte badminton plan
('Aske', 'Kylling', 'Bamse', 'Luna', 'ForlænsBaglæns')
('Aske', 'Bamse', 'ForlænsBaglæns', 'Luna', 'Kylling')
('Aske', 'Kylling', 'Bamse', 'ForlænsBaglæns', 'Luna')
('Aske', 'Bamse', 'ForlænsBaglæns', 'Kylling', 'Luna')
('Aske', 'Luna', 'Bamse', 'ForlænsBaglæns', 'Kylling')
('Aske', 'Kylling', 'ForlænsBaglæns', 'Luna', 'Bamse')
('Bamse', 'ForlænsBaglæns', 'Kylling', 'Luna', 'Aske')
('Aske', 'Luna', 'ForlænsBaglæns', 'Kylling', 'Bamse')
('Aske', 'Bamse', 'Kylling', 'Luna', 'ForlænsBaglæns')
('Aske', 'ForlænsBaglæns', 'Bamse', 'Kylling', 'Luna')
@fuglede
fuglede / _scipy-lap-comparison.ipynb
Last active July 15, 2020 11:17
Performance comparison of two LAP solvers in SciPy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fuglede
fuglede / _knights-tour.ipynb
Last active February 9, 2024 08:03
Knight's tour with graph traversal, constraint programming, and integer programming
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fuglede
fuglede / totalmeltdowntest.c
Created April 25, 2018 06:45
Test for Total Meltdown vulnerability
// Tests if a Windows 7 or Windows Server 2008 machine is vulnerable
// to the privilege escalation bug "Total Meltdown" described in
// http://blog.frizk.net/2018/03/total-meltdown.html
#include "stdafx.h"
int main() {
unsigned long long *p = (unsigned long long*)0xfffff6fb7dbedf68;
printf("Reading PML4E entry. If this causes a crash, you're safe.\n");
if (*p & 4)
@fuglede
fuglede / waterwall.go
Created April 25, 2018 06:14
Waterwall
// Provides a proxy that strips SNI information from TLS packets, allowing
// you to circumvent SNI inspecting firewalls. Is implemented here for
// Slack's web hooks but can be used for any host that only uses SNI for
// certificate provision (as opposed to request handling).
// To use it, simply ship off the HTTP request intended for Slack to :9010
// instead.
package main
import (
@fuglede
fuglede / fill.js
Last active May 1, 2018 19:26
VCTA auto-filler
// Fills in information on a 2018 vcta.dk profile page.
// To run,
// 1) Navigate to your team profile page in Chrome (seems to have issues on Firefox).
// 2) Right click one of the checkboxes and click "Inspect".
// 3) Go to the "Console" tab.
// 4) Paste the code below and click return.
var distance = prompt("How many km did you bike on weekdays?", 5);
for (var i = 3; i < 65; i += 2) {
@fuglede
fuglede / tensorflow101.ipynb
Last active August 30, 2023 06:45
TensorFlow 101
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fuglede
fuglede / queens.py
Last active October 9, 2016 11:44
Plotting solutions to the 8 queens puzzle
"""Script for solving and plotting all solutions to the queens puzzle: How to place
n queens on an n x n chessboard in such a way that none of them threaten each other.
"""
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import seaborn
from typing import Generator, List
@fuglede
fuglede / findhsts.py
Last active December 18, 2018 11:56
Find HSTS preloadable sites from HTTPS Everywhere database
"""Functions for fetching the HSTS headers of all target hosts
in HTTPS Everywhere rulesets.
The idea is to fetch all possible headers and in particular to
figure out which ones could be browser preloaded. As such, we
make some assumptions to simplify the number of hosts we need
to check: we only check the top level of domains that have
subdomain targets. We /do/ follow redirects though, which at the
end of the days gives rise to some false positives. A rough
guesstimate is that we over-estimate HSTS preloadability by
@fuglede
fuglede / starttlsinfo.py
Last active September 29, 2015 15:30
Python API for playing with results from starttls.info
"""Ad hoc API for starttls.info.
This module allows for the fetching of mail server protocol tests from the
website https://starttls.info.
Example:
Get the result of a host which has already been checked but don't bother
doing the check if the host hasn't already been checked::
>>> import starttlsinfo