Skip to content

Instantly share code, notes, and snippets.

@kingtosh
kingtosh / wordRegister.scpt
Created March 14, 2022 08:45 — forked from kuronekomichael/wordRegister.scpt
ことえり単語登録に文字を入力するApple Script -- appleScript, apple script, AppleScript
-- ことえり単語登録(== "WordRegister")
tell application "WordRegister"
activate
end tell
tell application "System Events"
-- 単語の欄にペースト
-- source url
-- http://d.hatena.ne.jp/zariganitosh/20140129/mavericks_kotoeri_mechanism
tell application "System Preferences"
reveal anchor "Text" of pane id "com.apple.preference.keyboard"
activate
end tell
@kingtosh
kingtosh / createramdiskatboot.command
Created April 15, 2022 10:41 — forked from Egregius/createramdiskatboot.command
Use RAM disk for macOS caches and logs
#!/bin/bash
while [ ! -d /Volumes ]
do
echo "waiting..."
sleep 0.5
done
if [ ! -d /Volumes/RamDisk ]; then
echo "creating ramdisk..."
sleep 0.5
diskutil partitionDisk $(hdiutil attach -nomount ram://$((2048*16000))) 1 GPTFormat APFS 'RamDisk' '100%'
@kingtosh
kingtosh / Run Menu Item - Collapse All Groups.jsx
Created April 15, 2022 16:52 — forked from MarshySwamp/Run Menu Item - Collapse All Groups.jsx
Code snippet: Run menu item - Collapse All Groups
/* An example of running a menu item command.
Use Script Listener to find the menu name, often by inserting the menu command into an action */
// Collapse all layer groups/sets
app.runMenuItem(stringIDToTypeID('collapseAllGroupsEvent'));
// another example:
// More info:
csrutil disable
sudo nvram boot-args="intcoproc_unrestricted=1 kext-dev-mode=1 amfi_allow_any_signature=1 amfi_unrestrict_task_for_pid=1 PE_i_can_has_debugger=1 cs_enforcement_disable=1 amfi_get_out_of_my_way=0x1 amfi=0xff"
sudo spctl --master-disable
sudo defaults write /Library/Preferences/com.apple.security.coderequirements Entitlements -string always
sudo defaults write /Library/Preferences/com.apple.security.coderequirements AllowUnsafeDynamicLinking -bool YES
sudo defaults write /Library/Preferences/com.apple.security.libraryvalidation.plist DisableLibraryValidation -bool YES
@kingtosh
kingtosh / launchd_memo.md
Created April 26, 2022 08:10 — forked from kozy4324/launchd_memo.md
launchd, launchctlについて(導入編)

launchd, launchctl

man

$ man launchd
$ man launchctl
$ man launchd.plist

$ man plutil

@kingtosh
kingtosh / 0-README.md
Created June 4, 2022 21:41 — forked from mattintosh4/0-README.md
Automator 用シェルクリプト集 その1

Shell script for Automator Part.1

Automator のシェルスクリプトアクションで使えるサンプル集です。「アプリケーション」や「サービス」を作成するときにどうぞ。


入力の種類について

@kingtosh
kingtosh / kensington-trackball.json
Created June 21, 2022 03:02 — forked from matsuoshi/kensington-trackball.json
Karabiner setting, for Kensington Trackball
{
"title": "for Kensington Trackball",
"rules": [
{
"description": "L_btn + R_btn to Button 2",
"manipulators": [
{
"type": "basic",
"from": {
"simultaneous": [

REFERENCES FOR LEARNING & USING APPLESCRIPT Modified: 2018/06/19 18:47


NOTES

AppleScript is a rather peculiar scripting language to learn.

@kingtosh
kingtosh / nsmb.conf
Created August 3, 2022 03:17 — forked from jbfriedrich/nsmb.conf
macOS 11.2 NSMB configuration
# /etc/nsmb.conf - macOS 11.3 - 2021-04-29
#------------------------------------------------------------------------------
# SMB configuration for macOS 11.3 <-> Synology
#------------------------------------------------------------------------------
# Additional information:
# -----------------------
# https://support.apple.com/de-de/HT211927
# https://support.apple.com/en-us/HT208209
# https://apple.stackexchange.com/questions/309016/smb-share-deadlocks-since-high-sierra
# https://photographylife.com/afp-vs-nfs-vs-smb-performance