Skip to content

Instantly share code, notes, and snippets.

View YCF's full-sized avatar
🎯
Focusing

YouCanFly YCF

🎯
Focusing
View GitHub Profile
@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"
@Rich-Harris
Rich-Harris / what-is-svelte.md
Last active March 20, 2025 20:49
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:

@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
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 6, 2025 14:21
crack activate Office on mac with license file
@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
@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) {
@jinyeow
jinyeow / bspwmrc
Last active November 7, 2022 13:30
Config files related to bspwm and panel (lemonbar)
#!/bin/zsh
ws1= # main
ws2= # web
ws3= # mail
ws4= # code
ws5= # math [infinity]  (term icon)
ws6= # media
ws7= # misc  (9 squares icon)
ws8= # notes/docs  (pdf icon)
@techimob
techimob / AAA
Created March 3, 2015 02:31
Test
AAA
@ccbikai
ccbikai / unsplash.py
Last active December 31, 2019 12:15
unsplash 全站下载脚本
# -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
# unsplash 全站下载脚本
# 请先安装 requests ,BeautifulSoup
# pip install requests beautifulsoup4
# 运行 python unsplash.py
# 输入最小页数和最大页数