Skip to content

Instantly share code, notes, and snippets.

@jacobbubu
jacobbubu / ioslocaleidentifiers.csv
Created February 15, 2012 14:41
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
@linjieFE
linjieFE / default.custom.yaml
Created April 7, 2023 03:32 — forked from lewangdev/default.custom.yaml
MacOS-like & Wechat-like Dark/Light Color Scheme For Rime
patch:
# 菜单
menu:
page_size: 8 # 候选词个数
# alternative_select_labels: [ ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, ⑨, ⑩ ] # 修改候选项标签
# alternative_select_keys: ASDFGHJKL # 如编码字符占用数字键,则需另设选字键
# ascii_mode、inline、no_inline、vim_mode 等等设定,可参考 /Library/Input Methods/Squirrel.app/Contents/SharedSupport/squirrel.yaml
# 中西文切换
#
# 【good_old_caps_lock】 CapsLock 切换到大写或切换中英。
@zhangyoufu
zhangyoufu / ln.py
Created August 25, 2022 10:47
create symlink on exFAT filesystem (macOS way)
#!/usr/bin/env python3
import argparse
import hashlib
import os
SMB_SYMHDRLEN = (4+1)+(4+1)+(32+1)
MAXPATHLEN = 0x400
# see smbfs_create_windows_symlink_data
def symlink(target: str, link: str) -> None:
@ryan-blunden
ryan-blunden / .env
Last active May 10, 2024 17:22
Python Application Config and Secrets Class
API_KEY="357A70FF-BFAA-4C6A-8289-9831DDFB2D3D"
HOSTNAME="0.0.0.0"
PORT="8080"
# Optional
# DEBUG="True"
# ENV="development"
@zhangyoufu
zhangyoufu / gdb.txt
Last active May 10, 2024 17:22
The architecture-specific signal handling code may adjust RIP/RAX to restart interrupted syscall. Address set be tracer via PTRACE_SETREGS may be decreased by 2 bytes unexpectedly on i386/x86-64. To workaround this behavior, tracer have to check whether tracee is in system call and whether the errno indicates restartable.
(gdb) set $rip=0xdeadbeef
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x00000000deadbeed in ?? ()
=> 0x00000000deadbeed:
Cannot access memory at address 0xdeadbeed
@mimoo
mimoo / linear_approx_table.py
Last active May 10, 2024 17:21
calculate linear approximation tables for Sboxes
import sys
# sbox from the tutorial
#sbox = [0xe, 4, 0xd, 1, 2, 0xf, 0xb, 8, 3, 0xa, 6, 0xc, 5, 9, 0, 7]
sbox = [0xf, 3, 0xa, 6, 4, 1, 0xb, 9, 0xe, 5, 0, 0xd, 2, 0xc, 7, 8]
SIZE_SBOX = len(sbox)
# compute the linear approximation for a given "input = output" equation
def linearApprox(input_int, output_int):
total = 0
@zhangyoufu
zhangyoufu / certs.txt
Created March 7, 2024 10:47
A configuration profile needed by VirtualBox VBoxHeadless, signed by Apple, valid for 18 years, grants several entitlements
% openssl pkcs7 -print_certs -text -in embedded.provisionprofile -inform der
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 134752589830791184 (0x1debcc4396da010)
Signature Algorithm: sha1WithRSAEncryption
Issuer: C=US, O=Apple Inc., OU=Apple Certification Authority, CN=Apple Root CA
Validity
Not Before: Feb 7 21:48:47 2013 GMT
Not After : Feb 7 21:48:47 2023 GMT
@zhangyoufu
zhangyoufu / apple_pki_attribute.txt
Created January 10, 2022 06:06
Apple PKI attributes (incomplete)
1.2.840.113635.100.6.1 Leaf Certificate
1.2.840.113635.100.6.1.2 iOS Development
1.2.840.113635.100.6.1.3 iOS App Store Application
1.2.840.113635.100.6.1.4 iOS Distribution
1.2.840.113635.100.6.1.6 iOS App Store VPN Application
1.2.840.113635.100.6.1.7 3rd Party Mac Developer Application
1.2.840.113635.100.6.1.8 3rd Party Mac Developer Installer
1.2.840.113635.100.6.1.9 Mac App Store Application
1.2.840.113635.100.6.1.10 Mac App Store Installer
1.2.840.113635.100.6.1.11 Mac App Store Receipt
@tenpoku1000
tenpoku1000 / AC_2017-12-06.md
Last active May 10, 2024 17:18
自作 OS の GUI 開発のためのメモ

自作 OS の GUI 開発のためのメモ

2024/04/20 更新

この記事は、自作OS Advent Calendar 2017の 12/6 の記事として書かれました。

主に、ライブラリや仕様書のダウンロード・サイトやリポジトリなどの URL を集めてみました。この他の URL は、以下でブックマークを公開していますので、興味がある方は参照してみてください。

@aferreira44
aferreira44 / fix-permission.sh
Created February 10, 2018 01:32
Arduino IDE error: ser_open(): can't open device "/dev/ttyUSB0": Permission denied
#!/bin/bash
sudo usermod -a -G dialout andre
sudo chmod a+rw /dev/ttyUSB0