Skip to content

Instantly share code, notes, and snippets.

@ohaiibuzzle
ohaiibuzzle / usb_notifier.py
Last active March 17, 2024 21:00
macOS USB Notifier
#!/usr/bin/env python3
import subprocess
import plistlib
import time
def send_notification(title, message, sound=None):
command = 'display notification "{}" with title "{}" sound name "{}"'\
.format(message, title, sound) \
@mattbailey
mattbailey / com.local.KeyRemapping.plist
Last active February 23, 2024 12:27
macos plist for remapping caps lock to left control, and right control to Fn which you can't do in system settings
<!--
Generated with: https://hidutil-generator.netlify.app/
Put in new file: ~/Library/LaunchAgents/com.local.KeyRemapping.plist
load with:
$ launchctl load ~/Library/LaunchAgents/com.local.KeyRemapping.plist
unload with (if you change it):
$ launchctl unload ~/Library/LaunchAgents/com.local.KeyRemapping.plist
should preserve through reboots.
@sttk3
sttk3 / pasteFont.jsx
Created October 27, 2023 10:06
記憶したフォントを選択しているテキストに適用するIllustrator用スクリプト。captureFont.jsxとセットで利用する
/**
* @file captureFont.jsxで記憶したフォントを選択しているテキストに適用する
* @version 1.0.0
* @author sttk3.com
* @copyright © 2023 sttk3.com
*/
//@target 'illustrator'
//@targetengine 'com.sttk3.attributes'
@sttk3
sttk3 / captureFont.jsx
Created October 27, 2023 10:03
選択しているテキストのフォントをIllustratorのtargetengineに記憶するスクリプト。pasteFont.jsxとセットで利用する
/**
* @file 選択しているテキストのフォントをtargetengineに記憶する。pasteFont.jsxとセットで利用する
* @version 1.0.0
* @author sttk3.com
* @copyright © 2023 sttk3.com
*/
//@target 'illustrator'
//@targetengine 'com.sttk3.attributes'
@doraTeX
doraTeX / ocr.sh
Last active March 10, 2024 02:58
A shell script to perform OCR on images/PDFs using macOS built-in OCR engine
#!/bin/bash
SCRIPTNAME=$(basename "$0")
function realpath () {
f=$@;
if [ -d "$f" ]; then
base="";
dir="$f";
else
base="/$(basename "$f")";
@chris1111
chris1111 / AMFIPass-Extract.command
Last active October 20, 2023 19:07
AMFIPass-Extract
#!/bin/bash
# Extract AMFIPass.kext
# By chris1111
# get AMFIPass path
if [ "$2" == "" ]; then
echo -n "Please move to terminal window ➤ \ OpenCore-Patcher.app \
Followed by ENTER: "
@creold
creold / addLinkedFileNames.jsx
Last active March 12, 2024 13:25
Adds the filenames of linked images on top. Adobe Illustrator script
/*
Description: Adds the filenames of linked or embedded images on top
Author: Sergey Osokin, email: hi@sergosokin.ru
Check my other scripts: https://github.com/creold
Donate (optional):
If you find this script helpful, you can buy me a coffee
- via Buymeacoffee: https://www.buymeacoffee.com/aiscripts
- via FanTalks https://fantalks.io/r/sergey
- via DonatePay https://new.donatepay.ru/en/@osokin
@creold
creold / copyColorsToClipboard.jsx
Last active June 1, 2023 09:46
Copy selected color values to a user's clipboard. Adobe Illustrator script
/*
copyColorsToClipboard.jsx by https://github.com/Inventsable
For revisions email: tom@inventsable.cc
Illustrator script to copy selected color values in the form [TYPE]=[VALUES] to a user's clipboard,
preferring SPOT color names over values
Discussion: https://community.adobe.com/t5/illustrator-discussions/copy-color-values-to-clipboard/m-p/13791617
Modification by Sergey Osokin, https://github.com/creold:
- Added path collection within groups
@usagimaru
usagimaru / Shortcuts_with_homebrew_commands.md
Last active June 29, 2023 05:09
How to resolve to use Homebrew commands from Shortcuts.app on macOS.

HomebrewコマンドをShortcuts.app (macOS) で利用するためにパスを通す

Shortcuts.appでShell Scriptを実行する際、/opt/homebrew/binにパスが通らない問題があった。

スクリプトの先頭行に以下の一文を追記して解決した。

PATH=$PATH:/opt/homebrew/bin
@koseki
koseki / bingchat-ime-fix.user.js
Last active October 16, 2023 00:29
macOS の Edge で Bing chat を使うと日本語入力確定時に勝手に送信されてしまう問題に対応する userscript
// ==UserScript==
// @name Bing Chat IME fix
// @namespace https://gist.github.com/koseki/d377f8f2e6df6655a1e160a4e03421d1
// @version 0.4
// @description macOS の Edge で Bing chat を使うと日本語入力確定時に勝手に送信されてしまう問題の対応です
// @author koseki
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @match https://www.bing.com/*
// @grant none
// ==/UserScript==