Skip to content

Instantly share code, notes, and snippets.

View LeoDJ's full-sized avatar


View GitHub Profile

Keybase proof

I hereby claim:

  • I am LeoDJ on github.
  • I am leodj ( on keybase.
  • I have a public key whose fingerprint is 3191 D9C9 5D64 ECF7 F1DE A832 91FC E46D 6401 3A5B

To claim this, I am signing this object:

LeoDJ /
Created March 7, 2017 21:50
ScanMyOpelCAN Android App log decryption [tags decoding deobfuscation =:A:?:B>=7=:;]
import java.util.*;
import java.lang.*;
class Decrypt
public static char[] d(byte[] bArr) { //reverse engineered obfuscation pattern
int length = bArr.length / 2;
if (bArr.length % 2 != 0) {
LeoDJ / doorStatus.php
Created March 14, 2017 21:01
A simple PHP persistance key/val store // Simply set the $secret to your password of choice and host the .php file on a server, then simply call the .php file with the given parameters
View doorStatus.php
ini_set('display_errors', true);
global $filePath, $secret;
$filePath = "doorStatusData.json";
LeoDJ / ESPWebSock.ino
Created August 18, 2016 21:35 — forked from bbx10/ESPWebSock.ino
ESP8266 Web server with Web Socket to control an LED
View ESPWebSock.ino
* ESP8266 Web server with Web Socket to control an LED.
* The web server keeps all clients' LED status up to date and any client may
* turn the LED on or off.
* For example, clientA connects and turns the LED on. This changes the word
* "LED" on the web page to the color red. When clientB connects, the word
* "LED" will be red since the server knows the LED is on. When clientB turns
* the LED off, the word LED changes color to black on clientA and clientB web
LeoDJ / doorStatus.php
Last active March 16, 2017 22:46
A simple PHP persistance key/val store // Simply set the $secret to your password of choice and host the .php file on a server, then call the .php file with ?help for more information
View doorStatus.php
header('Access-Control-Allow-Origin: https://yourDomain.tld');
$secret = "yourSecret"; //set you secret for write access here
ini_set('display_errors', true);
global $filePath, $secret;
$filePath = "doorStatusData.json";
function readDataFile() { //read data from persistance file
global $filePath;
LeoDJ / banggood_compactCart_bookmarklet
Last active June 25, 2017 01:54
Banggood Compact Shopping Cart Bookmarklet
View banggood_compactCart_bookmarklet
javascript:(function(){$(document.head).append('<style>.cart_main_list dt {display: none;}.cart_main_list dd ul {height: 75px;min-height: 0;}.cart_main_list dd ul .td_product a.img {margin-top: -20px;}.cart_main_list dd .ul_total {display: none;}.cart_main {margin-bottom: 0px;border: 0;padding: 0;}.cart_main_list dd ul .td_filter {display: none;}.cart_main_list dd ul .td_product_btn {display: none;}</style>')})()
LeoDJ /
Last active July 11, 2017 14:49
Greenshot Imgur Upload Script via External Command


I don't have admin rights on a PC, but do have Greenshot installed. Having said that, greenshot was installed without any online publishing plugins, but with the Office and External Command plugins.
So I set out and created a hacky solution with a more or less simple vbs script that uploads images to imgur using the external command plugin.

Installation Instructions

  • download the .vbs and the .bat file and place them in some folder (has to be in the same folder)
  • open Greenshot Settings
    • go to the "Plugins" tab
    • select "External command Plugin"
  • click "Configure"
View TTN Feinstaub Decoder.js
function Decoder(bytes, port) {
// Decode an uplink message from a buffer
// (array) of bytes to an object of fields.
var decoded = {};
//port 1 = data struct LSB first
//port 2 = data struct MSB first
if (port === 1) {
decoded.pm10 = (bytes[1] << 8) + bytes[0];
LeoDJ / downloader.js
Created May 8, 2018 08:38
ISDT firmware download script
View downloader.js
const cheerio = require('cheerio')
const request = require('request')
const fs = require('fs');
let subfolder = 'firmwares'
consoleLog = console.log
console.log = (text) => {
LeoDJ / middleScroll.ahk
Last active February 1, 2019 15:24
AHK middle mouse scroll everywhere
View middleScroll.ahk
; Description: Scroll Explorer on middle mouse button drag
; Permalink:
; Author: aph
; Version: 0.4.1
; Modified by: LeoDJ
; changelog:
; 0.4.1: - fixed Firefox getting stuck
; 0.4.0: - implemented much better exponential scrolling behaviour
; - tried to handle sticky scrolling better, but sometimes AHK does not see the KeyUp event, even when polled
; 0.3.0: - implement other scrolling behaviour, but still not perfect