Skip to content

Instantly share code, notes, and snippets.

View YCF's full-sized avatar
🎯
Focusing

YouCanFly YCF

🎯
Focusing
View GitHub Profile
@jackhumbert
jackhumbert / keymap.c
Created March 16, 2018 21:40
encoder
static uint8_t encoder_state = 0;
static int8_t encoder_value = 0;
static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 };
void matrix_init_user(void) {
encoder_state = PIND & 0x3;
}
void matrix_scan_user(void) {
@jackhumbert
jackhumbert / keymap.c
Created March 16, 2018 22:45
preonic with encoder
/* Copyright 2015-2017 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 16, 2025 21:12
crack activate Office on mac with license file
@OhYee
OhYee / vim.ahk
Last active May 10, 2024 17:57
实现类Vim操作
;SpaceFn
#inputlevel,2
SetCapsLockState, AlwaysOff ; 设置大写锁定为永远为关闭状态(本脚未触发时不会起作用)
*Capslock::SetCapsLockState, AlwaysOff ; 按下 Capslock 的时候设置为永远为关闭状态
^Capslock:: ; Ctrl + Capslock 切换大写锁定状态
If GetKeyState("CapsLock", "T") = 1
SetCapsLockState, AlwaysOff
Else
@Rich-Harris
Rich-Harris / what-is-svelte.md
Last active May 17, 2025 18:38
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

@deadprogram
deadprogram / go-uf2.go
Last active July 23, 2024 03:39
Converts a .BIN firmware file to a .UF2 file
// Converts firmware files from BIN to UF2 format before flashing.
//
// For more information about the UF2 firmware file format, please see:
// https://github.com/Microsoft/uf2
//
package main
import (
"fmt"
"io/ioutil"