Skip to content

Instantly share code, notes, and snippets.

View TyrfingMjolnir's full-sized avatar
💭
in my scriptorium whipping up some whoopass

Tyrfing Mjølner TyrfingMjolnir

💭
in my scriptorium whipping up some whoopass
View GitHub Profile
@TyrfingMjolnir
TyrfingMjolnir / Readme.md
Last active September 22, 2020 17:00
SuperMicro X11SSH-F

What is the procedure to turn the following hardware into an OpenCore Hackintosh setup

from a SuperMicro X11SSH-F w/Asus dual STRIX RX580?

CPU: Intel E3-1220 v6 KabyLake
CPUID: 0906E9h
for i in {1..9869}
do
# curl -kL "https://hotell.difi.no/api/json/brreg/enhetsregisteret?page=${i}" >> /tmp/brreg.json
curl -kL "https://hotell.difi.no/api/xml/brreg/enhetsregisteret?page=${i}" >> /tmp/brreg.json
# curl -kL "https://hotell.difi.no/api/csv/brreg/enhetsregisteret?page=${i}" >> /tmp/brreg.json
done
@TyrfingMjolnir
TyrfingMjolnir / johnnytwotimes.xml
Created August 11, 2020 15:10
Just some basic XML example for UBL
<document>
<contacts>
<contact id="93189192-d41f-4943-aec9-2fe471a940ed" party="vendor">
<name>Factory</name>
<country>CNSHA</country>
</contact>
<contact id="66dbb943-e089-4af4-8395-0a96751e766d" party="consignee">
<name>Any 3PL</name>
<country>NLRTM</country>
</contact>
@TyrfingMjolnir
TyrfingMjolnir / test.html
Created August 8, 2020 11:46
HTML + JS include
<html>
<head>
<meta name="generator" content="Handwritten HTML see www.w3.org for further assistance.">
<title>Trykk meg</title>
</head>
<body>
<h1 onclick="trykkmeg()">
<div>Hei</div>
</body>
<script src="test.js"></script>
@TyrfingMjolnir
TyrfingMjolnir / simctl.md
Last active August 2, 2020 21:49
Apple XCode simctl statusbar examples / getting started

This is like ls for the options of statusbar in the simulator controller.

xcrun simctl status_bar

Some examples below

Static project name gh-test-

xcrun simctl io booted recordVideo "gh-test-$(date).mp4"

Dynamic project name

xcrun simctl io booted recordVideo "${PWD##*/}_$(date +%Y-%m-%d_%H-%M-%S).mp4"

@TyrfingMjolnir
TyrfingMjolnir / ReadMe.md
Last active May 9, 2021 14:19
Keycloak in a Joyent SmartOS native zone

This setup worked for me using Joyent SmartOS 2020Q1

May 9th, 2021 This setup worked for me using Joyent SmartOS 2020Q4, the only thing I changed was the version number for postgresql to 12, psqljdbc to 42.2.20, and keycloak to 13.0.0, while OpenJDK was still 11.

( the native zone has 16 GB RAM assigned to it; Java and all ... )

useradd keycloak
groupadd keycloak
pkgin up
pkgin in tidy openjdk11 vim tmux postgresql96 && echo "or postgresql12"
cd /opt/local/
<?xml version="1.0" encoding="utf-8"?>
<datavalues>
<relaystate>1</relaystate>
<inputstate>0</inputstate>
<rebootstate>0</rebootstate>
<totalreboots>0</totalreboots>
</datavalues>
@TyrfingMjolnir
TyrfingMjolnir / Consideration.md
Last active June 7, 2020 19:51
BlueFeather's Let's Encrypt approach for Filemaker on MacOS X

sleep 15s

In /opt/local/GetSSL.sh editing sleep to match the time it takes for your solution to stop may be a good option as such.

Wait 15 seconds for FileMaker Server to stop an actual solution? 15 may work for FM example.fmp12, however for a real life production environment with several relationships between files on a volume mounted from ZFS across 8x NVMes w/ 17 000 MB/sec access, I see that 300 secs is more realistic. Probably you can get away with 125( as the time FileMaker allows for kicking the latter user is 120 secs. )

/Library/LaunchDaemons/tld.domain.fms-ssl

Running the LaunchDaemon at monthly intervals appears to be frequent enough. The example below runs a the 1st of every month at 00:01 hours, my guess is that this translates to 12:01 AM. The 24 hour clock is never 24:00 It's impossible. Note that the 24 hour clock goes from 00:00:00 to 23:59:59.

@TyrfingMjolnir
TyrfingMjolnir / MyMicroservices.swift
Last active June 2, 2020 23:02
My Microservice Apple System PreferencePane example
import Cocoa
import PreferencePanes
class MyMicroservices: NSPreferencePane {
@IBAction func myButton(_ sender: Any ) {
FileManager.default.createFile( atPath: NSString( "/tmp/MyMicroservices.txt" ).expandingTildeInPath,
contents: "\( Date() ) Amended".data( using: .utf8 ),
attributes: nil )
// echo "Amended" >> /tmp/MyMicroservices.txt
@TyrfingMjolnir
TyrfingMjolnir / readme.stdout
Created May 19, 2020 21:40
otool -L for my microservice written in vapor.
% otool -L ./myms
./myms:
@rpath/App.framework/Versions/A/App (compatibility version 0.0.0, current version 0.0.0)
@rpath/FluentPostgresDriver.framework/Versions/A/FluentPostgresDriver (compatibility version 0.0.0, current version 0.0.0)
@rpath/PostgresKit.framework/Versions/A/PostgresKit (compatibility version 0.0.0, current version 0.0.0)
@rpath/PostgresNIO.framework/Versions/A/PostgresNIO (compatibility version 0.0.0, current version 0.0.0)
@rpath/FluentSQL.framework/Versions/A/FluentSQL (compatibility version 0.0.0, current version 0.0.0)
@rpath/SQLKit.framework/Versions/A/SQLKit (compatibility version 0.0.0, current version 0.0.0)
@rpath/Fluent.framework/Versions/A/Fluent (compatibility version 0.0.0, current version 0.0.0)
@rpath/Vapor.framework/Versions/A/Vapor (compatibility version 0.0.0, current version 0.0.0)