Skip to content

Instantly share code, notes, and snippets.

View ganta's full-sized avatar
🐤

Hideki Igarashi ganta

🐤
View GitHub Profile
@ganta
ganta / README.md
Created May 18, 2022 16:10
Docker CLI Plugin for handling Intel version images

Installation

Put the script in ~/.docker/cli-plugin/docker-intel.

Usage

docker intel COMMAND
@ganta
ganta / mute-unwanted-activity.js
Created May 15, 2022 10:54
Clean up the Twitter timeline
// Visit https://twitter.com/settings/muted_keywords
// Open Developer tools console
// Paste and run the following code:
(async () => {
const keywords = `ActivityTweet
filter:follows -filter:replies
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
@ganta
ganta / cybozu-productivity-news-2022-03-17.md
Created March 8, 2022 07:18
Cybozu Productivity News 2022.03.17 - Show notes
@ganta
ganta / renice-apps.sh
Last active October 23, 2021 02:29
Zoom slows down the IME, so change the priority of the IME and Zoom process.
#!/usr/bin/env bash
set -euo pipefail
readonly apps=(
"GoogleJapaneseInput.app:-10"
"zoom.us.app:10"
)
sudo echo -n
@ganta
ganta / japanese-patch-for-emacs-24.3.patch
Created March 12, 2013 00:13
Emacs 24.3への日本語環境用のパッチです
diff --git configure.ac configure.ac
index 62f53a3..850eaa4 100644
--- configure.ac
+++ configure.ac
@@ -1571,7 +1571,7 @@ if test "${HAVE_NS}" = yes; then
leimdir="\${ns_appresdir}/leim"
INSTALL_ARCH_INDEP_EXTRA=
fi
- NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
+ NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o macim.o"
@ganta
ganta / update-anyenv.sh
Created December 2, 2019 03:09
Update anyenv envs with lazyload
#!/usr/bin/env bash
eval "$(anyenv lazyload)"
for envtool in $(\ls ~/.anyenv/envs)
do
${envtool} --version
done
anyenv update
@ganta
ganta / emacs.rb
Last active September 17, 2017 09:34
Emacs 25.3 Homebrew Fomula with inline patch https://gist.github.com/takaxp/5294b6c52782d0be0b25342be62e4a77 (especially, locale: en + Google IME)
class Emacs < Formula
desc "GNU Emacs text editor"
homepage "https://www.gnu.org/software/emacs/"
url "https://ftp.gnu.org/gnu/emacs/emacs-25.3.tar.xz"
sha256 "253ac5e7075e594549b83fd9ec116a9dc37294d415e2f21f8ee109829307c00b"
head do
url "https://github.com/emacs-mirror/emacs.git"
depends_on "autoconf" => :build
@ganta
ganta / emacs.rb
Last active November 13, 2016 16:38
Emacs 25.1 Homebrew Fomula with inline patch https://gist.github.com/takaxp/f30f54663c08e257b8846cc68b37f09f
class Emacs < Formula
desc "GNU Emacs text editor"
homepage "https://www.gnu.org/software/emacs/"
url "https://ftpmirror.gnu.org/emacs/emacs-25.1.tar.xz"
mirror "https://ftp.gnu.org/gnu/emacs/emacs-25.1.tar.xz"
sha256 "19f2798ee3bc26c95dca3303e7ab141e7ad65d6ea2b6945eeba4dbea7df48f33"
bottle do
rebuild 4
sha256 "c80ef281b85fb8a8bd65a84676056ea41d7bb2954d5c82193eef2acea2ade856" => :sierra
@ganta
ganta / gist:5360630
Created April 11, 2013 03:58
GitHubのcommitのURLの末尾に ?w=1 とつけると差分がわかりやすい(時がある) http://d.hatena.ne.jp/ken_c_lo/20130410/1365623063 を見てやっつけで作ったBookmarkletです。付いてなければ付けるだけです。もっと簡潔な書き方があれば教えてください。
javascript:
var url = location.href;
if (url.match(/^https:\/\/github\.com\/.*\/commit\//)) {
var params = url.split('?')[1];
if (params == undefined) {
location.href = url + '?w=1'
}
}
@ganta
ganta / GebConfig.groovy
Created July 31, 2013 16:30
Ghost DriverでUser-Agentを変更する設定
import org.openqa.selenium.phantomjs.PhantomJSDriver
import org.openqa.selenium.remote.DesiredCapabilities
driver = {
def capabilities = new DesiredCapabilities()
capabilities.setCapability(
'phantomjs.page.settings.userAgent',
'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)'
)
new PhantomJSDriver(capabilities)