Skip to content

Instantly share code, notes, and snippets.

@modellking
modellking / clock.vba
Last active January 18, 2021 16:33
Powerpoint Uhr | Powerpoint Clock | VBA
Option Explicit
Private abortFlag As Boolean
Sub pause()
Dim start
start = Timer
Do While Timer < start + 0.1
DoEvents
Loop
@modellking
modellking / a_set_of_files_to_make_browser_compat_visible_again.md
Last active March 2, 2022 11:18
MDN Browser Compatibility Table show version

You need a Browser extention that allow you to inject css into a page. I use and can recommend this one for Chrome

  1. Install/Enable Extention
  2. Go to any mdn article
  3. Click Extention and "Add Rule"
  4. Enter the css posted above
  5. Save, (close the extention tab), then reload the MDN page
  6. ???
  7. Profit!
@modellking
modellking / Nexus + Nginx TLS on docker.md
Last active April 12, 2023 13:58
Nexus Nginx TLS on docker

Prepare the following filestructure:

/nginx +-- nginx.conf # part of this gist
       +-- /certs +-- Nexus.crt.pem # "TRUSTED certificate"
                  +-- Nexus.key.pem

Run the following commands:

docker network create nexus

docker volume create --name nexus-data

@modellking
modellking / docker_volume_cp.sh
Last active May 8, 2023 14:39
docker volume cp [Volume] [Source] [Destination]
docker rm $(sudo docker cp $2 $(sudo docker container create -v $1:/root hello-world):/root/$3)
@modellking
modellking / gist:d44060795fcbc24a0cf1eefb824b9863
Created October 22, 2023 22:21
React JsonSchema Form schemaMerger
const handleObject = (node, path, cUiNode) =>
Object.fromEntries(Object.entries(node.properties).map(([prop, subschema]) => {
const fullCPath = [...path, prop]
return [prop, handleLayer(subschema, fullCPath, cUiNode[prop] ??= {})]
}))
const handleArray = (node, path, cUiNode) => handleLayer(node.items, [...path, "items", cUiNode.items ??= {}])
const handleOneOfAnyOf = (node, path, cUiNode, oneOf = node.oneOf) => {
oneOf.map(n => handleLayer(n, path, cUiNode)).forEach(o => Object.entries(o).forEach(([prop, subschema]) => cUiNode[prop] ??= subschema))