Skip to content

Instantly share code, notes, and snippets.

View wolfhechel's full-sized avatar

Pontus Jensen Karlsson wolfhechel

View GitHub Profile
@wolfhechel
wolfhechel / darwin_platform_uuid.py
Created July 7, 2016 10:14
ctypes implementation to retrieve platform UUID on OS X
from ctypes import *
from ctypes import util
from platform import mac_ver
import uuid
iokit = cdll.LoadLibrary(util.find_library('IOKit'))
cf = cdll.LoadLibrary(util.find_library('CoreFoundation'))
cf.CFStringCreateWithCString.argtypes = [c_void_p, c_char_p, c_int32]
@wolfhechel
wolfhechel / kevent_notification_asyncio.py
Created July 7, 2016 10:26
Testing KEvent notifcations with asyncio
import asyncio
import socket
import fcntl
import struct
import sys
SIOCSKEVFILT = 0x800c6502
@wolfhechel
wolfhechel / ship-detection.js
Created October 3, 2022 13:45
Ship detection script for Sentinel hub, forked from custom-script hub.
//VERSION=3
// Ship detection with S1 and S2
// Original source: https://custom-scripts.sentinel-hub.com/custom-scripts/data-fusion/ship_detection_s1_s2/script.js
// Original author: Monja B. Šebela
// Fork author: Pontus J. Karlsson
function setup() {
return {
input: [
{datasource: "S2L1C", bands:["B02", "B03", "B04", "B08"], mosaicking: "ORBIT"},
@wolfhechel
wolfhechel / input.scss
Created May 25, 2024 07:58
Generated by SassMeister.com.
:root {
--font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--body-color: #eceff4;
--body-background: #2e3440;
--hr-border-color: #4c566a;
--title-color: #eceff4;
--link-color: #8fbcbb;
--link-focus-color: #81a1c1;
--link-hover-color: #81a1c1;
--link-visited-color: #b48ead;