Skip to content

Instantly share code, notes, and snippets.

View rogierslag's full-sized avatar

Rogier Slag rogierslag

View GitHub Profile
@rogierslag
rogierslag / log
Created May 9, 2023 14:31
zipkin crash
oo
oooo
oooooo
oooooooo
oooooooooo
oooooooooooo
ooooooo ooooooo
oooooo ooooooo
oooooo ooooooo
{"requestedConnections":{"data":[{"id":7878,"url":"https://api.magnet.me/organizations/7878","avatar":{"id":361109,"name":"e5b70e7853b51f8d6f10073af4b2fd34381982ea5225562e67044b1099e4d592","title":"Booking_Com_Logotype_White_CMYK.jpg","baseUri":"https://uploads.magnetme-images.com/e5b70e7853b51f8d6f10073af4b2fd34381982ea5225562e67044b1099e4d592"},"name":"Booking.com","slug":"booking.com","description":"A career at Booking.com is all about the journey, helping you explore new challenges in a place where you can be your best self. With plenty of exciting twists, turns and opportunities along the wa...","industry":{"key":"IT","translation":"IT"},"website":"https://careers.booking.com/compass/","cover":{"id":361128,"name":"963c4e1422b489cff635e771384c992e68aa8f79be21805aa01aa158d02f2538","title":"Screenshot 2022-10-21 at 14.43.24.png","baseUri":"https://uploads.magnetme-images.com/963c4e1422b489cff635e771384c992e68aa8f79be21805aa01aa158d02f2538"},"photos":[{"id":89441,"url":"https://api.magnet.me/organization/787
@rogierslag
rogierslag / Levenshtein.java
Last active December 23, 2021 11:46
Levenshtein Java
import java.util.Arrays;
// Taken from https://www.baeldung.com/java-levenshtein-distance#dynamic-programming-approach
class Levenshtein {
private static int costOfSubstitution(char a, char b) {
return a == b ? 0 : 1;
}
private static int min(int... numbers) {
return Arrays.stream(numbers)
Sampling process 8830 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Gifox Media Service (pid 8830) every 1 millisecond
Process: Gifox Media Service [8830]
Path: /Applications/Gifox.localized/Gifox.app/Contents/XPCServices/Gifox Media Service.xpc/Contents/MacOS/Gifox Media Service
Load Address: 0x108a4b000
Identifier: com.gifox.gifox2-appstore.xpc.media
Version: 2.1.2 (020102.00)
Code Type: X86-64
Parent Process: ??? [1]
<!--SSR-->
<html lang="nl-NL">
<head>
<link rel="shortcut icon" href="https://cdn2.magnet.me/images/favicon.ico?v=2015">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- HTML4 first, HTML5 for supporting browsers -->
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta charset="UTF-8">
@rogierslag
rogierslag / extract.js
Last active January 14, 2020 10:43
Get fonts from current web page
// Open the inspector of a page you want to check and run the following script.
const foundVariants = [];
function variation(family, weight, style) {
return {key : `${family}-${weight}-${style}`, family, style, weight};
}
// Loop over all selectors
document.querySelectorAll('*').forEach(e => {
@rogierslag
rogierslag / example.html
Created January 6, 2020 15:30
Magnet.me button
<a href="https://magnet.me/connect/ondernemingsplanhulp?ref=button" class="magnet-me-connect-button" data-type="simple" data-size="32" data-organization="3932" rel="noopener noreferrer">Connect on Magnet.me</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://magnet.me/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'magnet-wjs');</script>
@rogierslag
rogierslag / top-100-badge.html
Last active April 30, 2019 13:25
Magnet.me top 100 popular jobs employer badge
<a href="https://magnet.me/"
target="_blank">
<!-- You can set the width of your button to any value between 150 and 284. The bigger the value, the bigger the badge will be -->
<img width="150"
alt="Top 100 popular jobs on Magnet.me"
src="https://cdn.magnet.me/badges/employers/nl/top100-popular-jobs-badge-2019_2x.png" />
</a>
<html>
<head>
<style>
body {
width: 500px;
border: 1px solid red;
}
.block {
display: flex;
@rogierslag
rogierslag / 1 SETUP.md
Last active August 3, 2018 21:17
password length vs hashing time

Experiment setup

I'm gonna use Ruby since it's the most readily available right now. Combined with Ruby I'm gonna use the bcrypt gem version 3.1.11.

Create the inputs

head -c 100M /tmp/100M