Skip to content

Instantly share code, notes, and snippets.

View oelna's full-sized avatar
😔
The light inside has broken, but I still work

Arno Richter oelna

😔
The light inside has broken, but I still work
View GitHub Profile
@oelna
oelna / index.html
Created May 31, 2024 14:13
CSS light/dark mode with manual toggle
<!doctype html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8">
<title>dark mode</title>
<link rel="stylesheet" href="style.css" />
<script src="script.js" defer></script>
</head>
@oelna
oelna / asn1.php
Created January 2, 2024 16:04
Cleaned-up version of the asn1.php script
<?php
// ASN.1 parsing library
// Attribution: http://www.krisbailey.com
// license: unknown
// modified: Mike Macgrivin hide@address.com 6-oct-2010 to support Salmon auto-discovery
// from openssl public keys
class ASN_BASE {
@oelna
oelna / flavor-wheel.svg
Created December 1, 2023 15:54
work-in-progress interactive flavor-profile generator in SVG and JS
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oelna
oelna / applescript.scpt
Created June 21, 2018 14:32
macOS Automator Action to calculate file hashes
on run {input, parameters}
with timeout of 360 seconds
tell application "System Events"
activate
display dialog input buttons {"OK"} default button 1 with title "File Hashes" giving up after 300 --seconds
end tell
end timeout
end run
@oelna
oelna / graphic.svg
Created January 17, 2020 15:44
SVG with query parameters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import Foundation
import AVKit
// This extension is based upon https://www.thonky.com/qr-code-tutorial/data-encoding
extension AVMetadataMachineReadableCodeObject
{
var binaryValue: Data?
{
switch type
{
@oelna
oelna / native-styles.css
Created October 13, 2023 13:05
Native OS styles exposed in the Browser via CSS
/* SYSTEM FONTS */
.body { font: -apple-system-body; }
.headline { font: -apple-system-headline; }
.subheadline { font: -apple-system-subheadline; }
.caption1 { font: -apple-system-caption1; }
.caption2 { font: -apple-system-caption2; }
.footnote { font: -apple-system-footnote; }
.short-body { font: -apple-system-short-body; }
@oelna
oelna / relics.txt
Created February 14, 2023 10:38
List of Relics in Slay the Spire
Akabeko
Anchor
Ancient Tea Set
Art of War
Astrolabe
Bag of Marbles
Bag of Preparation
Bird-Faced Urn
Black Blood
Black Star
@oelna
oelna / polychromie-architecturale.json
Created April 11, 2017 14:07
Le Corbusier's "Polychromie Architecturale" – all 63 colors as hex values, with their original name, ID and lightness coefficient (HBW) in a neat JSON array
[
{
"hex":"fff1ce",
"name":"blanc",
"hbw":72,
"id":"32001",
"collection":1931
},{
"hex":"585d5e",
"name":"gris foncé 31",
@oelna
oelna / convert.php
Last active November 15, 2022 09:14
A small utility webapp that converts between various string encodings and cleans up text http://convert.arnorichter.de (Note: this is now https://github.com/oelna/convert)
<?php
//check for PHP version requirements
if(version_compare(phpversion(), '5.3.0', '<')) die('This requires at least PHP 5.3 to run.');
date_default_timezone_set('Europe/Berlin');
$conversions = array(
array(
'text' => 'UTF-8 Decode',
'function' => function($input) {
return utf8_decode($input);