Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name uAutoPagerize
// @namespace http://d.hatena.ne.jp/Griever/
// @description loading next page and inserting into current page.
// @include main
// @compatibility Firefox 4.0
// @version 0.1.9.1
// @note 0.1.9.1 Yahoo! 用の例外処理を修正
// @note 0.1.9 セキュリティ上の問題を修正
// @note 0.1.9 細部を調整
@kingtosh
kingtosh / docSaveWithTimestamp.jsx
Created April 6, 2020 03:05 — forked from kanemu/docSaveWithTimestamp.jsx
[indesign][extendscript]保存毎に前回保存時のコピーを残す
#targetengine "logging"
var timeStamp = function(d){
var i,ary;
if(!d){ d = new Date() };
ary = [
d.getFullYear(),(d.getMonth()+1),d.getDate(),
d.getHours(),d.getMinutes(),d.getSeconds()
];
for(i=0,len=ary.length;i<len;i++){
@kingtosh
kingtosh / 00-replacing_MBA_SSD.md
Created January 30, 2021 19:37 — forked from kitakar5525/00-replacing_MBA_SSD.md
MacBook Air (Early 2015) のSSDを960 EVOに換装したメモです。この環境でArch Linux, macOS, Windowsが動作しました。他のMacでも、High Sierra以上かつ対応するアダプタを使用すればこのgistは参考になると思います。

MacBook Air(Early 2015)でNVMeのSSDに換装した話

MacBook Air (Early 2015) のSSDを960 EVOに換装しました。 MBAをNVMeのSSDに換装したという情報は日本語では少なかったのでメモ書き。 他のMacでも、High Sierra以上かつ対応するアダプタを使用すればこのgistは参考になると思います。

また、さすがにこの環境でWindowsやLinuxを動かしているという人は 検索した範囲ではまだ見つかりませんでしたね。

結論を言うと、macOSはじめWindows 10やArch Linuxでも動いていますが、注意する点がありました:

#!/usr/bin/env bash
diskutil_options="activity
appleRAID
coreStorage
disableJournal
disableOwnership
eject
enableJournal
enableOwnership

crontabの書き方

crontabの書き方

  • 設定書式
  • 設定項目は左から「分」「時」「日」「月」「曜日」となっている。
* * * * * [実行コマンド]
@kingtosh
kingtosh / レイアウトグリッドにスナップ.jsx
Created November 23, 2021 04:59 — forked from monokano/レイアウトグリッドにスナップ.jsx
InDesignドキュメントの「レイアウトグリッドにスナップ」をON/OFFするJavaScript v2
// 「レイアウトグリッドにスナップ」をON/OFFする v2
// ドキュメントの設定を変更するので、ドキュメントが開かれているか確認する
if (app.documents.length === 0) {
multiBtnDlg("レイアウトグリッドにスナップ", "ドキュメントを開いてください。", ["Close"], 0);
exit();
}
var myDoc = app.activeDocument;
@kingtosh
kingtosh / スマートガイド.jsx
Created November 23, 2021 04:59 — forked from monokano/スマートガイド.jsx
InDesignの「スマートガイド」をON/OFFするJavaScript
// 「スマートガイド」をON/OFFする v2
var b = app.smartGuidePreferences.enabled;
var status = "";
var buttonText = ""
if ( b ){
status = "ON";
buttonText = "OFF";
}else{
@kingtosh
kingtosh / レイアウトグリッドにスナップ.jsx
Created November 23, 2021 05:00 — forked from monokano/レイアウトグリッドにスナップ.jsx
InDesignドキュメントの「レイアウトグリッドにスナップ」をON/OFFするJavaScript
// 「レイアウトグリッドにスナップ」をON/OFFする
// ドキュメントの設定を変更するので、ドキュメントが開かれているか確認する
if (app.documents.length === 0) {
multiBtnDlg("レイアウトグリッドにスナップ", "ドキュメントを開いてください。", ["Close"], 0);
exit();
}
var myDoc = app.activeDocument;
@kingtosh
kingtosh / macOS_SytemPrefs.md
Created November 23, 2021 05:23 — forked from rmcdongit/macOS_SytemPrefs.md
Apple System Preferences URL Schemes

macOS 10.15 System Preference Panes

Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.

To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:

tell application "System Preferences"
	set CurrentPane to the id of the current pane
	set the clipboard to CurrentPane
@kingtosh
kingtosh / DoubleTap_left-control_Run_Safari.json
Created November 28, 2021 23:35 — forked from s-show/DoubleTap_left-control_Run_Safari.json
karabiner-elementsの設定(左controlを2回連打したらSafariが立ち上がる)
{
"description": "Double tap 'left_control' to 'open -a 'safari'",
"manipulators": [
{
"type": "basic",
"from": { "key_code": "left_control" },
"to": [
{ "shell_command": "open -a 'safari'" }
],
"conditions": [