Skip to content

Instantly share code, notes, and snippets.

View LuxXx's full-sized avatar

David LuxXx

View GitHub Profile
@LuxXx
LuxXx / detour.js
Created March 13, 2024 16:26
detour XMLHttpRequest
(function () {
// Preserve the original 'open' function
var originalOpen = window.XMLHttpRequest.prototype.open;
window.XMLHttpRequest.prototype.open = function () {
arguments[1] = arguments[1].replace(
"https://example.com/",
"https://detour.com/"
);
console.log("XHR intercepted:", arguments);
@LuxXx
LuxXx / test.ts
Created August 14, 2023 22:25
exhausting switch
type Book = "dune" | "snowcrash" | "dune2"
const b: Book = Math.random() > 0.5 ? "dune" : "snowcrash"
function f() {
switch (b) {
case "dune":
return 0
case "snowcrash":
return 0
@LuxXx
LuxXx / test.vtl
Created March 3, 2021 18:28
ElasticSearch to Meldung map
#set($inputRoot = $input.path('$'))
[
#foreach($elem in $inputRoot.hits.hits)
{
"titel": "$util.escapeJavaScript($elem.get("_source").titel).replaceAll("\\'","'")",
"vorname": "$util.escapeJavaScript($elem.get("_source").vorname).replaceAll("\\'","'")",
"nachname": "$util.escapeJavaScript($elem.get("_source").nachname).replaceAll("\\'","'")",
"name": "$util.escapeJavaScript($elem.get("_source").name).replaceAll("\\'","'")",
"position": "$util.escapeJavaScript($elem.get("_source").position).replaceAll("\\'","'")",
"is_company": $util.escapeJavaScript($elem.get("_source").is_company).replaceAll("\\'","'"),
@LuxXx
LuxXx / PCASVDComp.ipynb
Last active January 22, 2021 01:58
PCA SVD Compression
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LuxXx
LuxXx / LinMapping.ipynb
Created December 1, 2020 12:45
Linear Mapping Animation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LuxXx
LuxXx / noerw.ipynb
Created November 12, 2020 00:28
Nicht existierende Momente
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LuxXx
LuxXx / MetropolisHastings.ipynb
Created October 27, 2020 12:25
Metropolis Hastings Algorithm
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LuxXx
LuxXx / LinearesModell.ipynb
Last active August 20, 2020 16:57
Lineares Modell in numpy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LuxXx
LuxXx / LinearModel.ipynb
Created August 20, 2020 10:14
Linear Regression with sympy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LuxXx
LuxXx / IstanbulGame.ipynb
Created August 13, 2020 09:02
Istanbul Game Random Mechanic
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.