Skip to content

Instantly share code, notes, and snippets.

@aerobounce
aerobounce / リーディングリストに追加
Created July 6, 2015 08:00
Chromium から Safariのリーディングリストにページを追加する
on run {input, parameters}
tell application "Chromium"
set pageUrl to get URL of active tab of first window
end tell
tell application "Safari" to add reading list item pageUrl
display notification pageUrl with title "⭕️リーディングリストに追加しました"
return input
end run
@aerobounce
aerobounce / CoreAudioTypes.h
Created March 8, 2020 12:44
MacOSX10.14.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudioTypes.h
/*==================================================================================================
File: CoreAudio/CoreAudioTypes.h
Contains: Definitions types common to the Core Audio APIs
Copyright: (c) 1985-2010 by Apple, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
@aerobounce
aerobounce / FinderPaths.md
Last active April 9, 2020 07:07
How to get Finder's selection path in alias form, in AppleScript and JXA.

AppleScript

tell application "Finder"
    set itemList to (selection as alias list)
end tell

JXA

const Finder = Application("Finder")
@aerobounce
aerobounce / asl.conf
Created April 8, 2020 09:42
configuration file for syslogd and aslmanager - Notice level log disabled for faster shell launching with Terminal.app
##
# configuration file for syslogd and aslmanager
##
# aslmanager logs
> /var/log/asl/Logs/aslmanager external style=lcl-b ttl=2
# authpriv messages are root/admin readable
? [= Facility authpriv] access 0 80
@aerobounce
aerobounce / unicode.sh
Created April 9, 2020 07:03
Retrive Unicode Character suitable to use with FontForge script
#!/usr/bin/env bash
set -Ceu
unicode() {
for i in "$@"; do
echo -n "$i" | # -n ignore trailing newline
iconv -f utf8 -t UTF-32BE | # UTF-32 big-endian happens to be the code point
xxd -p | # -p just give me the plain hex
sed -e 's/^0000/0u/' | # remove leading 0's, replace with 0x
sed -e 's/\n/ /' # remove leading 0's, replace with 0x
@aerobounce
aerobounce / karabiner.json
Last active January 25, 2022 17:16
Suppress MacBook Pro Key Repeat Faulty with Karabiner
{
"available_since": "12.6.9",
"description": "Surpress MacBook Pro Key Repeat Faulty",
"manipulators": [
{
"from": { "key_code": "b" },
"parameters": {
"basic.to_if_held_down_threshold_milliseconds": 25
},
"to_if_held_down": [{ "key_code": "b", "repeat": false }],
@aerobounce
aerobounce / macOS System Preference Pane Links.md
Last active August 23, 2024 20:54
macOS System Preference Pane Links
import AppKit
import SwiftUI
// MARK: Wrap
public struct Wrap<Wrapped: NSView>: NSViewRepresentable {
private var makeView: () -> Wrapped
private var update: (Wrapped, Context) -> Void
public init(_ makeView: @escaping @autoclosure () -> Wrapped,
@aerobounce
aerobounce / Fix Duplicated iCloud Tabs.md
Last active May 26, 2021 04:47
Fix Duplicated iCloud Tabs

Fix Duplicated iCloud Tabs

  1. Logout Apple ID on all the devices except the main device (or Delete them from your main device if unavailable to use)
  2. Make sure Logged in Device is only 1 device, the main device
  3. Do all the cleanup procedure if needed (such as Clearing Safari History)
  4. Check off Keychain
  5. Logout Apple ID on the main device
  6. Login to Apple ID on the main device
  7. Login on the other devices
  8. Done
@aerobounce
aerobounce / open-icloudtabs.sh
Created October 23, 2021 18:49
convert iCloud tabs into html that lazily load its URL
#!/usr/bin/env bash
set -Ceu -o pipefail
TEMP_HTML_DIR="$(mktemp -d -t "open-icloudtabs")"
echo "Session directory:
$TEMP_HTML_DIR
"
DID_MAKE_WINDOW=0
makeWindowIfNeeded() {