Skip to content

Instantly share code, notes, and snippets.

@monokano
monokano / 同一リンクファイルを一括で再リンク.jsx
Last active June 6, 2024 01:05
Illustratorドキュメントの同一リンクファイルを一括で再リンクするスクリプト
//Illustratorドキュメントの同一リンクファイルを一括で再リンクする
//処理対象
//ドキュメント内で選択されているリンク
//重要:選択されていなくても、選択箇所と同一ファイルにリンクしていたら処理対象
//注意点
//ドキュメント内のリンク選択はダイレクト選択ツールで選択すること
//編集モードで実行しないように。処理が完了しなくなってしまう
@monokano
monokano / 合成フォント全削除.jsx
Created May 14, 2024 01:17
inddの合成フォントを全削除するスクリプト
var doc = app.activeDocument;
var compFonts = doc.compositeFonts;
for (var i=compFonts.length-1; i>0; i--) {
compFonts[i].remove();
}
@monokano
monokano / 本当の標準字形に戻す.jsx
Last active April 17, 2024 20:44
Illustratorの選択テキストを本当の標準字形に戻すスクリプト
//Illustratorの選択テキストを本当の標準字形に戻す
var selObj = activeDocument.selection;
if (selObj.length > 0) {
//オブジェクト選択
for (var i = 0; i < selObj.length; i++) {
if (selObj[i] != undefined){
if (selObj[i].typename== "TextFrame") {
var myText = selObj[i].textRange;
@monokano
monokano / リアルタイムの描画と編集OFF.jsx
Created April 2, 2024 05:31
Illustratorの「パフォーマンス > リアルタイムの描画と編集」をOFFにするスクリプト
app.preferences.setBooleanPreference("LiveEdit_State_Machine",false);
@hnsol
hnsol / speedtest_swiftbar.sh
Last active March 31, 2024 03:54
Monitor Wi-Fi speed: Automatic tests, monthly logs, and menu bar results.
#!/bin/bash
# <bitbar.title>Speedtest and Log</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>hann-solo</bitbar.author>
# <bitbar.author.github>hnsol</bitbar.author.github>
# <bitbar.desc>Displays the last 10 lines of speedtest. Keeps a log of speedtest results.</bitbar.desc>
# <bitbar.image>http://www.hosted-somewhere/pluginimage</bitbar.image>
# <bitbar.dependencies>bash</bitbar.dependencies>
# <bitbar.abouturl>http://url-to-about.com/</bitbar.abouturl>
@AhmedMohamedAbdelaty
AhmedMohamedAbdelaty / gist-downloader-plus.js
Last active May 8, 2024 18:37
a userscript that adds a download button to GitHub gists, allowing you to directly download GitHub gists as source files.
// ==UserScript==
// @name Gist Downloader Plus
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Directly download GitHub gists as source files.
// @author Ahmed Mohamed Abdelaty
// @match https://gist.github.com/*/*
// @grant GM_addStyle
// @grant GM_xmlhttpRequest
// @grant GM_download
@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'