Skip to content

Instantly share code, notes, and snippets.

View krestenlaust's full-sized avatar
🎶
Hopefully more programming this year

Kresten Laust krestenlaust

🎶
Hopefully more programming this year
View GitHub Profile
@krestenlaust
krestenlaust / pkce-callback.js
Created March 1, 2026 11:11
OIDC Public authorization code - PKCE callback handler
const clientId = "demo";
const tokenAuthEndpoint = "http://127.0.0.1:8000/o/token/"
async function handleCallback() {
const params = new URLSearchParams(window.location.search);
const code = params.get("code");
const returnedState = params.get("state");
if (!code || !returnedState){
console.log("No code or state");
@krestenlaust
krestenlaust / Primtal.bf
Created August 29, 2020 20:40
Finder første tal af en primtal faktor opløsning, fx givet 60 = 2 x 2 x 3 x 5, giver den det første tal, altså 2
// Første tal til primtal faktorisering af Kresten den 29/08/20
// 0th; 1st; 2nd; 3rd; 4th; 5th; 6th; 7th
// tæller; 0; dividend; 0; divisor; 0; 0; 0
+ // tæller = 1
>> // dividend
++++ +++ // 2nd = stdin
// ==UserScript==
// @name Video was paused killer
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Kills the "Video paused. Continue?" box that pops up every once in awhile
// @author Nett18 - github.com/kres0345
// @match https://www.youtube.com/watch?v=*
// @grant none
// ==/UserScript==
@krestenlaust
krestenlaust / UbuntuKaliRepos
Created February 3, 2018 23:27
Kali repos in Ubuntu
`sudo nano /etc/apt/sources.list`
add:
`
deb http://http.kali.org/kali kali-rolling main contrib non-free
# For source package access, uncomment the following line
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free
`
Enter command after:
alert("XSS");
console.log("XSS");