Skip to content

Instantly share code, notes, and snippets.

@niw
niw / README.en.md
Last active Sep 23, 2021
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac
View README.en.md

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 8/19/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac
View 異体字化けを直す.applescript
tell application "Adobe InDesign 2021"
try
--選択テキストを取得する
set curSelection to object reference of selection of document 1
if class of curSelection is in {text, character, word, line, paragraph, text style range, text column} then
set everyChar to object reference of every character of curSelection
--1文字ずつ処理をする
repeat with aChar in everyChar
@monokano
monokano / inddver.py
Last active Nov 8, 2020
InDesignファイル(ドキュメント、ブック、ライブラリ、テンプレート)の作成アプリバージョンを検出する
View inddver.py
#!/usr/bin/python
#
# Usage: python inddver.py indesign-file(indd,indb,indl,indt)
#
# This script will detect the app version written in the indesign file.
#
import sys, os, re
def getAppName(verDec):
@l3nz
l3nz / README.md
Last active Mar 10, 2021
NOT Fixed: accountsd using 400% CPU on MacOS Catalina 10.15.7 (19H2)
View README.md

accountsd using 400% CPU on MacOS Catalina 10.15.7 (19H2)

TL;DR: Still open - see below.

This morning I woke up to some not-so-nice surprise - my 2018 MPB 13" would be kind of totally unusable. The accountsd process was stable at 400%, battery was going like ice-cream in the Sahara, and opening up LibreOffice was like a major achievement.

I did check the logs (that were growing at like 500 lines per second) and I saw a lot of lines at FAULT level:

fault	07:54:04.271342+0200	accountsd	Unentitled access by client 'CallHistoryPlugi' (selector: accountsWithAccountType:handler:)
@UskeS
UskeS / SwitchBulletConfig.txt
Created May 10, 2020
[InDesign][ExtendScript] 箇条書き記号を設定ファイルに従って入れ替える。SwitchBulletConfig.txt というファイルが同階層にある必要があります。
View SwitchBulletConfig.txt
// サンプルです
// 行頭に半角スラッシュを入れるとその行は読み込まれません
// フォントファミリー スタイル(ウェイト) GID値 後続テキスト
// という形でタブ区切りテキストを用意してください
// 最後の後続テキストは省略可能です
A-OTF UD新ゴ Pr6N L 12238 ^t
A-OTF UD新ゴ Pr6N L 12246
A-OTF UD新ゴ Pr6N L 12228 :
// A-OTF UD新ゴ Pro M 12224
@UskeS
UskeS / JumpToNextParaStyle.jsx
Last active May 10, 2020
[InDesign][ExtendScript] 選択している段落スタイルを検索し、ストーリー上で同じ段落スタイルが当たっている次の/前の段落にジャンプする
View JumpToNextParaStyle.jsx
/**
* fileoverview 選択しているテキストに適用されている段落スタイルを検索し、同じ段落スタイルが適用された次のテキストにジャンプする
* @author SAEGUSA Yusuke
* @version 0.0.1
*/
if (app.documents.length === 0 || app.selection.length === 0) {
myError("001");
}
@azu
azu / .phoenix.js
Last active Apr 19, 2020
SplitView on ~/.phoenix.js
View .phoenix.js
const appNames = {
left: "Tweeten",
right: "MyDiscord"
}
const windowRatio = {
left: 0.75,
right: 0.25
};
/**
* SplitView
@ayyybe
ayyybe / ccdl.command
Last active Sep 21, 2021
Adobe Offline Package Generator v0.1.2 (macOS only) --- No longer being updated.
View ccdl.command
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@penn201500
penn201500 / mount-ram.sh
Created Mar 10, 2020 — forked from koshigoe/mount-ram.sh
Like tmpfs in Mac OSX
View mount-ram.sh
#!/bin/sh
# This program has two feature.
#
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
#
# Usage:
# $0 <dir> <size>
#
@UskeS
UskeS / changeCellHeight.js
Last active Feb 25, 2020
[InDesign]選択したセルの高さを変更する
View changeCellHeight.js
/**
* @fileoverview 選択したセルの高さを変更する
* @author Yusuke SAEGUSA
* @version 0.0.1
*/
if (app.documents.length === 0) {
exit();
}
if (app.activeDocument.selection.length !== 1) {