Skip to content

Instantly share code, notes, and snippets.

From 13f0260beae851f7d5dd96e9ef757d8d6d7daac1 Mon Sep 17 00:00:00 2001
From: Mark Adler <madler@alumni.caltech.edu>
Date: Sun, 9 Feb 2020 07:20:13 -0800
Subject: [PATCH] Fix false overlapped components detection on 32-bit systems.
32-bit systems with ZIP64_SUPPORT enabled could have different
size types for zoff_t and zusz_t. That resulted in bad parameter
passing to the bound tracking functions, itself due to the lack of
use of C function prototypes in unzip. This commit assures that
parameters are cast properly for those calls.
<?php
function locate_customButtonArray() {
return array(
"Locate" => "locatePart",
);
}
function locate_locatePart($info) {
// Trigger locatePart things
@berkutta
berkutta / acme-dns-auth.py
Last active January 7, 2020 07:31
certbot certonly --manual --manual-auth-hook /etc/letsencrypt/acme-dns-auth.py --preferred-challenges dns --debug-challenges -d *.mydomain.ch
#!/usr/bin/env python
import json
import os
import requests
import sys
from requests.auth import HTTPBasicAuth
# URL to acme-dns instance
ACMEDNS_URL = ""
ACMEDNS_DOMAIN = ""
@berkutta
berkutta / logging.kt
Created May 9, 2019 11:53 — forked from tomaszpolanski/logging.kt
RxLogging
@file:Suppress("NOTHING_TO_INLINE")
import android.util.Log
import io.reactivex.*
inline fun <reified T> printEvent(tag: String, success: T?, error: Throwable?) =
when {
success == null && error == null -> Log.d(tag, "Complete") /* Only with Maybe */
success != null -> Log.d(tag, "Success $success")
error != null -> Log.d(tag, "Error $error")
uint8_t mac[6];
char mac_string[17];
wifi_get_macaddr(0x00, mac);
sprintf(mac_string, "%X:%X:%X:%X:%X:%X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
graphic_puts_5x7(5, 35, "No WiFi");
graphic_puts_5x7(5, 45, mac_string);
graphic_puts_5x7(5, 55, "John Doe");