Skip to content

Instantly share code, notes, and snippets.

View lhotari's full-sized avatar

Lari Hotari lhotari

View GitHub Profile
@lhotari
lhotari / DefaultKeyBinding.dict
Last active December 11, 2023 13:11 — forked from trusktr/DefaultKeyBinding.dict
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
@lhotari
lhotari / clean_microk8s_registry.sh
Created April 21, 2021 04:02 — forked from Kevinrob/clean.md
Clean up microk8s registry
#!/bin/bash
registry=localhost:32000
repositories=$(curl ${registry}/v2/_catalog)
for repo in $(echo "${repositories}" | jq -r '.repositories[]'); do
echo $repo
tags=$(curl -sSL "http://${registry}/v2/${repo}/tags/list" | jq -r '.tags[]')
for tag in $tags; do
echo $tag
curl -v -sSL -X DELETE "http://${registry}/v2/${repo}/manifests/$(
curl -sSL -I \
@lhotari
lhotari / smx8fancontrol
Last active December 17, 2020 20:31 — forked from ikus060/smx8fancontrol
Python script to edit the X8DTU-F Registry to control fan speed.
#!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0