Skip to content

Instantly share code, notes, and snippets.

View okooo5km's full-sized avatar
🤔
Focusing

十里 okooo5km

🤔
Focusing
View GitHub Profile
@AFutureD
AFutureD / config.json
Created September 17, 2024 14:16
Swift LSP support for iOS on vscode
// .sourcekit-lsp/config.json
{
"swiftPM": {
"triple": "arm64-apple-ios-simulator",
"swiftCompilerFlags": [
"-sdk",
"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk",
"-target",
"arm64-apple-ios18.0-simulator"
],
@wibus-wee
wibus-wee / DownloadWeChatStickers_macOS.js
Last active July 15, 2024 03:09
Download WeChat Stickers in macOS
// How to use: node DownloadWeChatStickers_macOS.js
// Requirements: curl, node
// Reference: https://blog.jogle.top/2022/08/14/macos-wechat-sticker-dump/
const { execSync } = require('child_process');
const { randomUUID } = require('crypto');
const fs = require('fs');
const exec = require('child_process').exec;
const os = require('os');
const argv = process.argv.slice(2);
@PrasannaKumarChalla
PrasannaKumarChalla / RSVerticallyCenteredTextFieldCell.swift
Created August 27, 2017 18:08
vertically align nstextfield text
class RSVerticallyCenteredTextFieldCell: NSTextFieldCell {
var mIsEditingOrSelecting:Bool = false
override func drawingRect(forBounds theRect: NSRect) -> NSRect {
//Get the parent's idea of where we should draw
var newRect:NSRect = super.drawingRect(forBounds: theRect)
// When the text field is being edited or selected, we have to turn off the magic because it screws up
// the configuration of the field editor. We sneak around this by intercepting selectWithFrame and editWithFrame and sneaking a
// reduced, centered rect in at the last minute.