Skip to content

Instantly share code, notes, and snippets.

View caksoylar's full-sized avatar

Cem Aksoylar caksoylar

View GitHub Profile
@madushan1000
madushan1000 / zmk_split_battery_level_linux.py
Created January 16, 2024 22:25
See battery levels of a zmk split ble keyboard on linux
from dbus_next.aio import MessageBus
from dbus_next.constants import BusType
import asyncio
BLUEZ = "org.bluez"
#replace hci0 with your bluetooth adapter name and FF_FF_FF_FF_FF_FF with your keyboard address
BLUEZ_PATH = "/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF"
GATT_SERVICE = 'org.bluez.GattService1'
GATT_CHARACTERISCITC = 'org.bluez.GattCharacteristic1'
GATT_CHARACTERISCITC_DESCR = 'org.bluez.GattDescriptor1'
BATTERY_UUID = "0000180f-0000-1000-8000-00805f9b34fb"
def get_all_cookies():
'''
WARNING: We use unsupported features of Streamlit
However, this is quite fast and works well with
the latest version of Streamlit (1.27)
RETURNS:
Returns the cookies as a dictionary of kv pairs
'''
from streamlit.web.server.websocket_headers import _get_websocket_headers
# https://github.com/streamlit/streamlit/pull/5457
@jcmkk3
jcmkk3 / alpha23332.md
Last active May 12, 2024 04:39
23332 Key Alpha Layouts

hands down neu23332

w c l d _   _ u o y '
r s n t p   k a e i h
_ f m g b   j x , . _

hands down neu23332-hindex

w c l d _   _ y o u '
@mattmc3
mattmc3 / readme.md
Last active May 9, 2023 16:54
Fish Shell - Wordle Helper

Fish Wordle Helper

Wordle is a simple word game where you try to guess a 5-letter word each day. This gist contains a small Fish function to help you narrow down the list of possible answers based on the scores from each guess.

How To Play

Guess the Wordle in 6 tries.

  • Each guess must be a valid 5-letter word.
  • The color of the tiles will change to show how close your guess was to the word.
@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:
@urob
urob / git_for_zmk.md
Last active March 29, 2024 23:18
Maintaining a personal ZMK fork
@Merlin04
Merlin04 / gergoplex.def
Last active July 13, 2022 01:56
Gergoplex QMK keymap
// Gergoplex specfic combos
COMB(qwGrv, KC_GRV, KC_Q, KC_W)
COMB(zxTab, KC_TAB, KC_Z, KC_X)
COMB(uyEqu, KC_EQL, KC_U, KC_Y)
COMB(ySclnMins, KC_MINS, KC_Y, KC_SCLN)
COMB(hnQuot, KC_QUOT, KC_H, KC_N)
COMB(pgEsc, KC_ESC, KC_P, KC_G)
COMB(kmHome, KC_HOME, KC_K, KC_M)
@romainl
romainl / grep.md
Last active April 28, 2024 19:53
Instant grep + quickfix

FOREWORDS

I don't mean the snippet at the bottom of this gist to be a generic plug-n-play solution to your search needs. It is very likely to not work for you or even break things, and it certainly is not as extensively tested and genericised as your regular third-party plugin.

My goal, here and in most of my posts, is to show how Vim's features can be leveraged to build your own high-level, low-maintenance, workflows without systematically jumping on the plugins bandwagon or twisting Vim's arm.


Instant grep + quickfix

@martinbuberl
martinbuberl / git-import-repository.md
Last active October 11, 2023 09:56
Import existing Git repository into another

Import existing Git repository into another

Folder structure before (2 separate repositories):

XXX
 |- .git
 |- (project files)
YYY
 |- .git