Skip to content

Instantly share code, notes, and snippets.

View eightpigs's full-sized avatar
🙃
I may be slow to respond.

eightpigs eightpigs

🙃
I may be slow to respond.
View GitHub Profile
@Kyle-Ye
Kyle-Ye / XcodeLLM.md
Last active January 3, 2025 12:10
Enable XcodeLLM for ChinaSKU Mac on macOS 15 Beta 1

Warning

The following guide need to disable SIP to work.

Please confirm the risk of disabling the SIP by yourself.

Another solution which does not require disabling SIP is currently under investigation.

Step 0

Reboot into Recovery OS + Disable SIP

@cloudwu
cloudwu / sortnumber.c
Created August 1, 2023 05:38
sort telephone number
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdio.h>
#define N (100000063/64)
struct bitset {
uint64_t bits[N];
@arcadefire
arcadefire / bottomsheet.kt
Created September 12, 2021 12:50
Bottom sheet
enum class States {
EXPANDED,
COLLAPSED
}
@ExperimentalMaterialApi
@Composable
fun FullHeightBottomSheet(
header: @Composable () -> Unit,
body: @Composable () -> Unit
{
"PD-KB401W": {
"typeNumber": "PD-KB401W",
"layoutType": 1,
"colorType": 0,
"series": 0,
"layoutTypeName": 1,
"postfix": "",
"isKeymapChangeable": true,
"firmTypeNumber": "AHHX01",
@lihongjie0209
lihongjie0209 / PoJoGen.groovy
Last active December 4, 2019 12:11
根据Jetbrain IDE 的数据库查询工具得到的结果生成Java Bean
/*
* Available context bindings:
* COLUMNS List<DataColumn>
* ROWS Iterable<DataRow>
* OUT { append() }
* FORMATTER { format(row, col); formatValue(Object, col) }
* TRANSPOSED Boolean
* plus ALL_COLUMNS, TABLE, DIALECT
*
* where:
local function Chinese()
-- 简体拼音
hs.keycodes.currentSourceID("com.apple.inputmethod.SCIM.ITABC")
end
local function English()
-- ABC
hs.keycodes.currentSourceID("com.apple.keylayout.ABC")
end
@stav121
stav121 / polybar-config
Created January 3, 2019 00:57
Transparent Polybar Config
[colors]
background = #1d1f2110
background-alt = #282a2e
foreground = #1d1f21
foreground-alt = #1d1f21
[bar/main_bar]
width = 100%
height = 27
;offset-x = 1%
@sivartravis
sivartravis / a-wysiwyg-rich-text-editor-with-contenteditable-attribute.markdown
Created March 10, 2017 16:00
A WYSIWYG Rich Text Editor with contentEditable attribute
@85degree
85degree / updateip.lua
Created February 13, 2016 21:18
CloudFlare Dynamic DNS using OpenWRT
#!/usr/bin/lua
-- Original script: https://github.com/nileshgr/utilities/blob/master/general/updateip.lua
-- http://nileshgr.com/2015/09/23/cloudflare-dynamic-dns-using-openwrt
-- For use with openwrt since openwrt supports LUA.
-- Prerequisites:
-- luasec
-- luasocket
-- libubus-lua
@zacwest
zacwest / ios-font-sizes.swift
Last active May 8, 2025 21:46
iOS default font sizes - also available on https://www.iosfontsizes.com
let styles: [UIFont.TextStyle] = [
// iOS 17
.extraLargeTitle, .extraLargeTitle2,
// iOS 11
.largeTitle,
// iOS 9
.title1, .title2, .title3, .callout,
// iOS 7
.headline, .subheadline, .body, .footnote, .caption1, .caption2,
]