Skip to content

Instantly share code, notes, and snippets.

View colorpeak's full-sized avatar

Takeshi Kimura colorpeak

View GitHub Profile
@p-mng
p-mng / README.md
Last active March 17, 2026 03:15
Uninstall Rosetta 2 on macOS

Uninstall Rosetta 2 on macOS

1. Disable SIP (System Integrity Protection)

  1. Boot into recovery
  2. Open a terminal (Utilities > Terminal)
  3. Disable SIP using csrutil disable
  4. Reboot into macOS

2. Uninstall Rosetta

@Ehtisham95
Ehtisham95 / parallels-reset.sh
Created February 29, 2024 08:06
Reset Parallels' trial
#!/bin/sh
# Reset Parallels Desktop's trial and generate a casual email address to register a new user
rm /private/var/root/Library/Preferences/com.parallels.desktop.plist /Library/Preferences/Parallels/licenses.xml
jot -w pdu%d@gmail.com -r 1
@rok-git
rok-git / ocr.sh
Last active January 22, 2026 06:42 — forked from doraTeX/ocr.sh
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")";
@doraTeX
doraTeX / ocr.sh
Last active January 16, 2026 14:57
A shell script to perform OCR on images/PDFs using macOS built-in OCR engine -- https://doratex.hatenablog.jp/entry/20230629/1687977178
#!/bin/bash
SCRIPTNAME=$(basename "$0")
function realpath () {
f=$@;
if [ -d "$f" ]; then
base="";
dir="$f";
else
base="/$(basename "$f")";
@hdknr
hdknr / README.md
Last active February 8, 2026 05:56
macOS: ls: .: Operation not permitted

macOS: ls: .: Operation not permitted

このエラーは、macOSのセキュリティ機能によって、ターミナルのコマンドが特定のディレクトリに対して制限されている可能性があります¹²。例えば、DownloadsやDocumentsなどのディレクトリは、プライバシー保護のためにアクセス権が制限されています²。

この場合、システム環境設定から、ターミナルに対してフルディスクアクセスを許可する必要があります¹²。具体的な手順は以下の通りです。

  • システム環境設定を開きます。
  • セキュリティとプライバシーを選択します。
  • プライバシータブをクリックします。
  • 左側のメニューからフルディスクアクセスを選択します。
@Y-dash
Y-dash / .twitter-user.css
Last active May 7, 2025 08:06
Twitter用のユーザーCSS。わりと老人会仕様。
/* ツイートを好みのフォントに */
body.ja, .r-gwet1z, .r-1tl8opc, .r-1qd0xha {
/* というかコレは昔のTwitterのフォント */
font-family: Arial, "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", メイリオ, Meiryo, "MS Pゴシック", "MS PGothic", sans-serif;
}
/* TLのツイートのテキストサイズを好みに */
p.ProfileTweet-text.js-tweet-text.u-dir, .TweetTextSize.js-tweet-text.tweet-text:not(.TweetTextSize--28px), .r-a023e6 {
font-size: 14px;
line-height: 18px;
@ryonakae
ryonakae / bookmarklet.js
Last active October 14, 2025 15:11
Twitterの興味関心 (https://twitter.com/settings/your_twitter_data/twitter_interests) のチェックをすべて外すブックマークレット
javascript:(function(){var%20href_pc="https://twitter.com/settings/your_twitter_data/twitter_interests";var%20href_mobile="https://mobile.twitter.com/settings/your_twitter_data/twitter_interests";if(location.href!==href_pc&&location.href!==href_mobile){return%20location.href=href_pc;}var%20inputArray=[];var%20timer=0;var%20count=0;document.querySelector("main").querySelectorAll('input[type="checkbox"][checked]').forEach(function(input){inputArray.push(input);});window.addEventListener("error",function(error){clearInterval(timer);alert("エラーが発生したため中断しました");});timer=setInterval(function(){var%20input=inputArray[count];var%20label=input.closest("label");var%20offsetTop=input.getBoundingClientRect().top+window.scrollY-100;window.scrollTo(0,offsetTop);label.dispatchEvent(new%20MouseEvent("click"));count++;if(count===inputArray.length){clearInterval(timer);alert("すべてのチェックを外しました");}},3000);})();
@stkchp
stkchp / get-dslite-aftr-in-asahinet.md
Last active November 29, 2025 14:29
ASAHIネットのDS-Liteの終端(AFTR)を取得するメモ

ASAHIネットのDS-Liteの終端(AFTR)を取得する

ASAHIネットがDS-Lite対応したので、 自宅の適当なLinuxルーターにて設定しようとして詰まったAFTR取得に関するメモ。

Linuxルーターを使ってる人向けのニッチなものだけど、情報として残しておく。

終端の情報公開について

@LukeZGD
LukeZGD / ios-downgrade-dualboot.md
Last active March 15, 2026 13:00
Downgrade and dualboot status of almost all iOS devices

Downgrade and dualboot status of almost all iOS devices

UPDATED: 2026-02-08

@ChristopherA
ChristopherA / macOS-Preferences-Defaults.sh
Last active January 15, 2026 16:48
macOS Preferences Defaults
#!/usr/bin/env zsh
#===========================================================================
# * INFO
#
# macOS Preferences Defaults
# By Christopher Allen @ChristopherA https://github.com/christophera/
# My most basic macOS preferences, in this gist to make it easy to load on
# multiple machines and VMs. Ideally runs on all macOS versions since Yosemite,