Skip to content

Instantly share code, notes, and snippets.

@crides
crides / layout.py
Last active November 26, 2023 20:04
# Extracts QMK `info.json` layout data from kicad pcb
# You need to have the `pcbnew` module importable (should be installed when kicad is installed)
import re, pcbnew, json
from typing import Callable
from functools import reduce
kicad7 = pcbnew.Version().startswith("7")
if kicad7:
@rock3r
rock3r / MainActivity.kt
Created June 16, 2022 16:13
WebView Compose scroll example
package dev.sebastiano.webviewcompose
import android.annotation.SuppressLint
import android.content.Context
import android.os.Bundle
import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.background
@dovahkiin98
dovahkiin98 / AutoSizeText.kt
Created October 4, 2021 09:03
AutoSize text implementation in Jetpack Compose
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.BoxWithConstraintsScope
import androidx.compose.foundation.text.InlineTextContent
import androidx.compose.foundation.text.InternalFoundationTextApi
import androidx.compose.foundation.text.TextDelegate
import androidx.compose.material.LocalTextStyle
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@NullSense
NullSense / bilateral_combos.patch
Created April 22, 2021 11:07
QMK Bilateral combinations patch
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index 2387f50dc8..4448ceae4b 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -51,6 +51,10 @@ int retro_tapping_counter = 0;
# include "fauxclicky.h"
#endif
+#if (BILATERAL_COMBINATIONS + 0)
+# include "quantum.h"
@tararoys
tararoys / May12knausj-master-cheatsheet.pdf
Last active September 1, 2023 05:14
Code to print out all voice commands in the knausj talon repository,
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@torgeir
torgeir / zoom-mute-status-setup.md
Last active October 13, 2022 21:21
Example configurations for AnyBar and Ubsersicht to get a visual cue representing your zoom mute status. Credits https://gist.github.com/tyhawkins/66d6f6ca8b3cb30c268df76d83020a64
@prologic
prologic / LearnGoIn5mins.md
Last active April 30, 2024 15:10
Learn Go in ~5mins
#!/usr/bin/env kotlin
@file:DependsOn("com.github.ajalt.clikt:clikt-jvm:3.0.1")
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.core.UsageError
import com.github.ajalt.clikt.output.TermUi
class App : CliktCommand() {
enum class DaemonType {
@kaushikgopal
kaushikgopal / karabiner.edn
Last active October 13, 2023 21:15
My source Karabiner file in Goku's edn format - Now lives @ https://github.com/kaushikgopal/dotfiles/blob/master/.karabiner.edn
;; File has moved over to https://github.com/kaushikgopal/dotfiles/blob/master/.karabiner.edn
;; Feel free to raise github issues in that repo, if you have questions/comments/edits
@tyhawkins
tyhawkins / zoom-mute-status.scpt
Last active May 27, 2022 20:51
Get Zoom Mute/Unmute Status
property btnTitle : "Mute audio"
if application "zoom.us" is running then
tell application "System Events"
tell application process "zoom.us"
if exists (menu item btnTitle of menu 1 of menu bar item "Meeting" of menu bar 1) then
set returnValue to "Unmuted"
else
set returnValue to "Muted"
end if