Skip to content

Instantly share code, notes, and snippets.

@AJABON
AJABON / カラーパネルよしなに.jsx
Last active October 23, 2025 06:55
Illustrator: 最前面ドキュメントのカラーモードに合わせてカラーパネルの表示を切り替えるやつ
// Illustrator: 最前面ドキュメントのカラーモードに合わせてカラーパネルの表示を切り替えるやつ
// 2025.10.22 (z-)
main();
function main(){
if(app.documents.length == 0) return;
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
var colorSpace = app.activeDocument.documentColorSpace.toString().replace(/^.+\./, "");
colorSpace = colorSpace == "RGB"? "HSB" : colorSpace; // RGBならHSBに、CMYKならCMYKのままに
@Yamonov
Yamonov / CMYKto100GCRConverter_ai.jsx
Last active December 6, 2025 08:38
IllustratorのCMYK値を、CMYのうち2色+Kに置き換えるスクリプト
#target illustrator
var YamoScriptVersion = "Ver 1.3.1 (2025-11-19)";
// CMYK値をCMYのうち1〜2版+Kに変換するスクリプト
// CMYKオブジェクトを選択して実行する。彩度調整オプションオフでは、ほぼ色を変えない
// 配布gist
// https://gist.github.com/Yamonov/3a90a9a50389c68095c5f14577ad09d5
// 2025-11-19:不必要な機能を無効化(ありがとう @Creold)
@youandhubris
youandhubris / AppleScript Mail Send.scpt
Last active September 24, 2025 17:28
AppleScript to send e-mail, using Apple's Mail, with multiple recipients, cc, bcc and attachments
tell application "Mail"
set theFrom to ""
set theTos to {}
set theCcs to {}
set theBccs to {}
set theSubject to ""
set theContent to ""
set theSignature to ""
@okapies
okapies / mastodon-client.md
Last active October 3, 2023 10:18
Mastodon API の叩き方

Mastodon の API を叩くには以下の手順を踏む必要がある:

  1. OAuth2 クライアントを登録する
  2. アクセストークンを取得する
  3. アクセストークンを Authorization ヘッダに指定して API にアクセスする

OAuth2 クライアント登録

Mastodon の Apps API に登録情報を送ってクライアントを払い出してもらう(一度だけやれば OK).

@kanemu
kanemu / fitArtboard.jsx
Created August 10, 2011 08:09
[illustrator]アートボードをオブジェクト全体に合わせる
#target "Illustrator"
function mergedBounds(bns,nowBns){
if(!bns){
bns=nowBns;
}else{
if(nowBns){
if(bns[0]>nowBns[0])bns[0]=nowBns[0];
if(bns[1]<nowBns[1])bns[1]=nowBns[1];
if(bns[2]<nowBns[2])bns[2]=nowBns[2];