Skip to content

Instantly share code, notes, and snippets.

Avatar

Stefan 0xLeon

View GitHub Profile
@0xLeon
0xLeon / FileSize.js
Created Sep 13, 2020
Calculate Server Index File Size
View FileSize.js
[...$$('html > body > pre')[0].textContent.matchAll(/\d+$/gm)].map((a) => parseInt(a[0])).reduce((acc, val) => acc + val) / Math.pow(1024, 3)
@0xLeon
0xLeon / FlipRowsColumns.bas
Created Jun 15, 2020
Excel - Flip Rows / Columns
View FlipRowsColumns.bas
Sub FlipRows()
Dim vTop As Variant
Dim vEnd As Variant
Dim iStart As Integer
Dim iEnd As Integer
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
iStart = 1
@0xLeon
0xLeon / BCPlus.user.js
Created Oct 10, 2018
Bare version of »new« BCPlus (actually just a now playing function for BisaChat)
View BCPlus.user.js
// ==UserScript==
// @name BisaChat Plus
// @namespace http://projects.0xleon.com/userscripts/bcplus
// @version 4.0.0.dev1
// @description Make BisaChat Great Again
// @author Stefan Hahn
// @match https://bisachat.bisafans.de/index.php?room/*
// @grant none
// @run-at document-end
// ==/UserScript==
@0xLeon
0xLeon / PointCloudDensity.py
Created Jun 28, 2018
Point Cloud Density Calculation
View PointCloudDensity.py
"""
Provides methods for calculating point cloud densities.
All methods can handle instances of PLYObject or list or ndarray instances of lists of vertices.
"""
import numpy as np
import scipy.spatial
def getRealDensityFromPlane(ply, planeParams):
"""
@0xLeon
0xLeon / BCChromeFullscreenFix.user.js
Created May 17, 2018
Fixes a BisaChat fullscreen bug in Chrome
View BCChromeFullscreenFix.user.js
// ==UserScript==
// @name BisaChat Chrome Fullscreen Fix
// @namespace http://projects.0xleon.com/userscripts/bc-chrome-full-fix
// @version 1.0.0
// @description Fixes a BisaChat fullscreen bug in Chrome.
// @author Stefan Hahn
// @copyright 2018, Stefan Hahn
// @match https://bisachat.bisafans.de/index.php?room/*/
// @grant unswafeWindow
// @run-at document-body
@0xLeon
0xLeon / calibrate.py
Created May 17, 2018
Improved Python camera calibration script using OpenCV
View calibrate.py
#!/usr/bin/env python3
import argparse
import glob
import multiprocessing.dummy
import os
import sys
import cv2 as cv
import numpy as np
@0xLeon
0xLeon / DECSCA-Validation.mag
Last active Feb 10, 2018
Magma Script validating the German CSCA self-signed certificate using ECDSA
View DECSCA-Validation.mag
// Prime Field Size
p := 0x8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123ACD3A729901D1A71874700133107EC53;
// Curve Parameter One
a := 0x7BC382C63D8C150C3C72080ACE05AFA0C2BEA28E4FB22787139165EFBA91F90F8AA5814A503AD4EB04A8C7DD22CE2826;
// Curve Parameter Two
b := 0x04A8C7DD22CE28268B39B55416F0447C2FB77DE107DCD2A62E880EA53EEB62D57CB4390295DBC9943AB78696FA504C11;
// Cofactor
h := 0x01;
// Curve Base Point X
@0xLeon
0xLeon / SeenLive.txt
Last active Feb 17, 2020
Bands I've seen live
View SeenLive.txt
9x Caliban
9x Stick to Your Guns
6x Deadlock
6x Heaven Shall Burn
6x Neaera
6x Parkway Drive
5x Darkest Hour
5x Emmure
5x Terror
5x War from a Harlots Mouth
@0xLeon
0xLeon / bitmaps.c
Last active May 23, 2016
Performance optimized graphics functions based on Teensy library for CAB202
View bitmaps.c
unsigned char bm_face_happy[] = {
0b11111111, 0b11111111,
0b00000001, 0b10000000,
0b00000001, 0b10000000,
0b00000001, 0b10000011,
0b00110001, 0b10000100,
0b00110001, 0b10001000,
0b00000001, 0b10001000,
0b00000001, 0b10001000,
@0xLeon
0xLeon / RainbowMode.js
Created Apr 17, 2016
RainBow Mode module for BCPlus
View RainbowMode.js
Modules.RainbowMode = (function() {
var bcplus = null;
var initialize = function(_bcplus) {
bcplus = _bcplus;
buildUI();
addEventListeners();
};
You can’t perform that action at this time.