This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| fix_mkf_pair.py - 清理 MAP.mkf 末尾空 chunk 并对齐 GOP.mkf | |
| 功能: | |
| 1. 检测 MAP.mkf 末尾连续的空 chunk(大小为0),将其清除 | |
| 2. 对齐 GOP.mkf 的 chunk 数量与清理后的 MAP.mkf 一致 | |
| - GOP 不足则追加空 chunk | |
| - GOP 末尾多余的空 chunk 则截掉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| fix_gop_mkf.py - 修复 GOP.mkf 使其 chunk 数量与 MAP.mkf 一致 | |
| 背景: | |
| MAP.mkf 和 GOP.mkf 通过相同的 chunk 编号(iMapNum)一一对应。 | |
| PAL_LoadMap() 中会校验 iMapNum < chunkCount(MAP) 且 iMapNum < chunkCount(GOP)。 | |
| 如果 MAP.mkf 已被修复添加了哨兵空 chunk,而 GOP.mkf 没有, | |
| 则两者 chunk 数量不一致,会导致最后一个有效地图无法加载。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| proxy-groups: | |
| - { name: AppleMusic, type: select, proxies: [DIRECT, 通用代理,香港, 台湾, 日本, 新加坡, 美国, 德国, 其他] } | |
| - { name: AppleNews+, type: select, proxies: [DIRECT, 通用代理,香港, 台湾, 日本, 新加坡, 美国, 德国, 其他] } | |
| - { name: AppleTV+, type: select, proxies: [DIRECT, 通用代理,香港, 台湾, 日本, 新加坡, 美国, 德国, 其他] } | |
| rules: | |
| # Apple Music TV | |
| - 'DOMAIN,tv.applemusic.com,AppleMusic' | |
| - 'DOMAIN,music.apple.com,AppleMusic' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| pathname=$1 | |
| filename=$(basename $pathname .mkv) | |
| dirname=$(dirname $pathname) | |
| h264videopath="$dirname/../h264video/$filename.h264" | |
| aacaudiopath="$dirname/../aacaudio/$filename.m4a" | |
| aacvideopath="$dirname/../aacvideo/$filename.mp4" | |
| ac3videopath="$dirname/../ac3video/$filename.mp4" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set found to 0 | |
| set resolution_wide to 1440 | |
| tell application "System Events" | |
| repeat with i from 1 to (count of window of process "Safari") | |
| set bnds to bounds of window i of application "Safari" | |
| set wide to item 3 of bnds | |
| if wide < resolution_wide then | |
| set found to 1 | |
| end if | |
| end repeat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef NEW_METHOD | |
| //old method | |
| #ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time | |
| clock_serv_t cclock; | |
| mach_timespec_t mts; | |
| host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock); | |
| clock_get_time(cclock, &mts); | |
| mach_port_deallocate(mach_task_self(), cclock); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tell application "Safari" | |
| set theURL to URL of front document | |
| set theTitle to name of front document | |
| -- set the clipboard to theTitle & return & theURL as string | |
| end tell | |
| -- change the status message to your liking here: | |
| set tweet to "test Reading: " & theURL & space & theTitle & " cc @yamibo " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ^([2-9]\d{3}((0[1-9]|1[012])(0[1-9]|1\d|2[0-8])|(0[13456789]|1[012])(29|30)|(0[13578]|1[02])31)|(([2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00))0229)_[\u4e00-\u9fa5]+_[a-zA-Z0-9_]+.txt$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -(void)awakeFromNib{ | |
| //statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain]; | |
| //[statusItem setMenu:statusMenu]; | |
| //[statusItem setTitle:@"Status"]; | |
| //[statusItem setHighlightMode:YES]; | |
| //[[NSStatusBar systemStatusBar] removeStatusItem:statusItem]; | |
| { | |
| BOOL checked = NO; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0"?> | |
| <root> | |
| <item> | |
| <name>Enable at only Preview</name> | |
| <item> | |
| <name>Use J and K to Up and Down</name> | |
| <identifier>remap.app_preview_jk2UpDown</identifier> | |
| <only>PREVIEW</only> | |
| <autogen>--KeyToKey-- KeyCode::J, KeyCode::CURSOR_DOWN</autogen> | |
| <autogen>--KeyToKey-- KeyCode::K, KeyCode::CURSOR_UP</autogen> |