Skip to content

Instantly share code, notes, and snippets.

@vonj
vonj / AutoCrop.lua
Created February 19, 2024 23:32 — forked from stecman/AutoCrop.lua
Lightroom plugin to calculate image crops using OpenCV
-- LR imports
local LrApplication = import("LrApplication")
local LrApplicationView = import("LrApplicationView")
local LrBinding = import("LrBinding")
local LrDevelopController = import("LrDevelopController")
local LrDialogs = import("LrDialogs")
local LrExportSession = import("LrExportSession")
local LrFileUtils = import("LrFileUtils")
local LrFunctionContext = import("LrFunctionContext")
local LrLogger = import("LrLogger")
@vonj
vonj / el-pio-demo.c
Created March 17, 2022 22:26 — forked from zephray/el-pio-demo.c
Driving EL display with Raspberry Pi Pico's PIO
// Copyright 2021 Wenting Zhang <zephray@outlook.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
@vonj
vonj / ntfs-filenames.txt
Created December 8, 2021 14:24 — forked from doctaphred/ntfs-filenames.txt
Invalid characters for Windows filenames
Information from https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file :
Use any character in the current code page for a name, including Unicode
characters and characters in the extended character set (128–255), except
for the following:
- The following reserved characters:
< (less than)
> (greater than)

Keybase proof

I hereby claim:

(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(ansi-color-names-vector
["#2d3743" "#ff4242" "#74af68" "#dbdb95" "#34cae2" "#008b8b" "#00ede1" "#e1e1e0"])
'(c-basic-offset 4)
@vonj
vonj / language shootout bstring
Created July 4, 2013 06:35
Example from the bstring library.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "bstrlib.h"
/*
* strcatTest is a function written by Doug Bagley and is part of the "Great
* Computer Language Shootout": http://www.bagley.org/~doug/shootout/
*
@vonj
vonj / terminal_title_play
Created May 21, 2013 11:46
Play a stream (shoutcast or other) in mplayer, but display the song name in the title bar
#!/usr/bin/python
import subprocess
import re
import sys
url = 'http://de.scenemusic.net/necta48.aac'
# Mods and chiptunes tunes often have too high stereo separation, soften it with
# panning: