Skip to content

Instantly share code, notes, and snippets.

View erikdubbelboer's full-sized avatar

Erik Dubbelboer erikdubbelboer

View GitHub Profile
export function loadPokiSDK() {
const getParameterByName = (name) => {
const match = RegExp(`[?&]${name}=([^&]*)`).exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
};
const queue = [];
const isLocalhost = window.location.hostname === 'localhost';
window.PokiSDK = new Proxy(
@erikdubbelboer
erikdubbelboer / collisions.txt
Created October 25, 2019 18:37
Hash collision demos
# collision inputs taken from https://www.mscs.dal.ca/~selinger/md5collision/
# As you can see they produce the same MD5 hash
$ echo -n 'd131dd02c5e6eec4693d9a0698aff95c2fcab58712467eab4004583eb8fb7f8955ad340609f4b30283e488832571415a085125e8f7cdc99fd91dbdf280373c5bd8823e3156348f5bae6dacd436c919c6dd53e2b487da03fd02396306d248cda0e99f33420f577ee8ce54b67080a80d1ec69821bcb6a8839396f9652b6ff72a70' | xxd -r -p | md5
79054025255fb1a26e4bc422aef54eb4
$ echo -n 'd131dd02c5e6eec4693d9a0698aff95c2fcab50712467eab4004583eb8fb7f8955ad340609f4b30283e4888325f1415a085125e8f7cdc99fd91dbd7280373c5bd8823e3156348f5bae6dacd436c919c6dd53e23487da03fd02396306d248cda0e99f33420f577ee8ce54b67080280d1ec69821bcb6a8839396f965ab6ff72a70' | xxd -r -p | md5
79054025255fb1a26e4bc422aef54eb4
# Now add 01 to the end of both of them.
# The hash will be different from above but they will still produce a collision.
$ echo -n 'd131dd02c5e6eec4693d9a0698aff95c2fcab58712467eab4004583eb8fb7f8955ad340609f4b30283e488832571415a085125e8f7cdc99fd91dbdf2
package main
import (
"bytes"
"fmt"
"net"
"runtime"
"sync"
"sync/atomic"
"time"
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"fmt"
package main
import (
"fmt"
"runtime"
"sync"
"sync/atomic"
"time"
)
@erikdubbelboer
erikdubbelboer / DistributionVectorUniformParam.cpp
Created October 14, 2018 08:53
Unreal Engine 4 DistributionVectorUniformParam Particle Distribution
#include "DistributionVectorUniformParam.h"
#include "Particles/ParticleSystemComponent.h"
UDistributionVectorUniformParam::UDistributionVectorUniformParam(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
@erikdubbelboer
erikdubbelboer / go.mod
Created September 18, 2021 20:15
fasthttp client timeout test
module test
go 1.17
require github.com/valyala/fasthttp v1.30.0
require (
github.com/andybalholm/brotli v1.0.2 // indirect
github.com/klauspost/compress v1.13.4 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
package gziphandler
import (
"compress/gzip"
"log"
"net/http"
"strings"
"sync"
)
package main
import (
"fmt"
"io"
"io/ioutil"
"net"
"os"
"time"
)