Skip to content

Instantly share code, notes, and snippets.

View mantono's full-sized avatar

Anton Österberg mantono

View GitHub Profile
@mantono
mantono / INSTRUCTIONS.md
Last active November 4, 2024 23:11
QMK on Ferris Sweep (using nix)

Note: These instructions are for the Liatris micro controller. Skip/alter the -e CONVERT_TO=liatris if you are using a ProMicro or Elite-C micro controller.

  1. Installl qmk, or run it in a nix shell: nix-shell -p qmk
  2. Go to the qmk_firmware directory, and compile the firmware: qmk compile -kb ferris/sweep -km [KEYMAP] -e CONVERT_TO=liatris. This will generate the firmware in form of a .u2f file inside the qmk_firmware directory.
  3. Hold the "Boot button" on the micro contoller, while attaching the keyboard/controller. If done correctly, it will show up as a USB storage device.
  4. Mount the storage device.
  5. Copy the U2F file to the storage device.
  6. Unmount the storage device.
  7. Done
@mantono
mantono / Config.kt
Last active October 28, 2019 20:04
Configuration loading with Typesafe config in Kotlin
package com.mantono
/**
* implementation("com.typesafe:config:1.4.0")
* See https://github.com/lightbend/config
*/
import com.typesafe.config.ConfigFactory
import com.typesafe.config.Config as TypeSafeConfig
@elfmimi
elfmimi / Lily58-Nicola.kbd.json
Last active December 27, 2025 20:13
Lily58 親指シフト
[
{"name": "Lily58 親指シフト"},
[{x:3,a:7},"",{x:6.5},""],
[{y:-0.94,x:2},"",{x:1,a:4},"\n\n「",{x:4.5},"』",{x:1,a:7},""],
[{y:-0.86,x:5,a:4},"\n\n」",{x:2.5},"『"],
[{y:-0.95,x:1},"!\n\n?",{x:10.5,a:7},""],
[{y:-0.94},"",{x:12.5},""],
[{y:-0.31,x:3,a:4,f:5},"り\n\nだ\n\n\n\n\n\n\n\nた",{x:6.5},"ぐ\n\nる\n\n\n\n\n\n\n\nく"],
[{y:-0.94,x:2},"え\n\nが\n\n\n\n\n\n\n\nか",{x:1},"ゃ\n\nご\n\n\n\n\n\n\n\nこ",{x:4.5},"ぢ\n\nに\n\n\n\n\n\n\n\nち",{x:1},"づ\n\nま\n\n\n\n\n\n\n\nつ"],
[{y:-0.86,x:5},"れ\n\nざ\n\n\n\n\n\n\n\nさ",{x:2.5},"ぱ\n\nよ\n\n\n\n\n\n\n\nら"],
@s1monw1
s1monw1 / build.grade.kts
Created December 1, 2017 23:46
Blog Post Example Script
import org.gradle.kotlin.dsl.extra
import org.jetbrains.kotlin.gradle.dsl.Coroutines
import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val kotlinVersion = plugins.getPlugin(KotlinPluginWrapper::class.java).kotlinPluginVersion
val kotlinCoroutinesVersion = "0.19.3"
val vertxVersion = "3.5.0"
val nexusRepo = "http://x.x.x.x:8080/nexus/content/repositories/releases"
@klaaspieter
klaaspieter / ASS.md
Created June 22, 2017 07:59 — forked from anonymous/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@mantono
mantono / arch_install_guide.sh
Last active September 24, 2017 12:31
Install Arch - Basic commands adjusted for my need
#!/bin/zsh
# Set Swedish keymap
loadkeys sv-latin1
# Verfiy that we are using UEFI
ls /sys/firmware/efi/efivars
# Check that internet works
ping archlinux.org
@mantono
mantono / gpg2_pass_ssh_github.txt
Last active January 26, 2023 12:25
GPG / SmartCard / Yubikey / pass in Ubuntu
# Ubuntu
sudo apt install libpam-yubico yubikey-personalization yubioath-desktop gnupg2 gnupg-agent pcscd libpcsclite1 opensc gpgsm
# Arch - https://wiki.archlinux.org/index.php/yubikey
pacman -S gnupg opensc yubico-c yubico-c-client yubico-pam yubikey-personalization yubikey-personalization-gui pcsc-tools
# Gentoo
# Use flag should be persisted in make.conf to keep this
USE="security-key smartcard" emerge yubikey-manager sys-auth/polkit sys-apps/dbus
@lukas-h
lukas-h / license-badges.md
Last active December 23, 2025 15:41
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@cjaoude
cjaoude / gist:fd9910626629b53c4d25
Last active December 9, 2025 16:35
Test list of Valid and Invalid Email addresses
Use: for testing against email regex
ref: http://codefool.tumblr.com/post/15288874550/list-of-valid-and-invalid-email-addresses
List of Valid Email Addresses
email@example.com
firstname.lastname@example.com
email@subdomain.example.com
firstname+lastname@example.com
@Flafla2
Flafla2 / Perlin_Tiled.cs
Last active December 20, 2025 16:40
A slightly modified implementation of Ken Perlin's improved noise that allows for tiling the noise arbitrarily.
public class Perlin {
public int repeat;
public Perlin(int repeat = -1) {
this.repeat = repeat;
}
public double OctavePerlin(double x, double y, double z, int octaves, double persistence) {
double total = 0;