Skip to content

Instantly share code, notes, and snippets.

View ganta's full-sized avatar
🐤

Hideki Igarashi ganta

🐤
  • Cybozu, Inc.
  • Japan
  • 10:30 (UTC +09:00)
  • X @ganta0087
View GitHub Profile
@ganta
ganta / README.md
Created May 18, 2022 16:10
Docker CLI Plugin for handling Intel version images
View README.md

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
View mute-unwanted-activity.js
// 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
View cybozu-productivity-news-2022-03-17.md
@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.
View renice-apps.sh
#!/usr/bin/env bash
set -euo pipefail
readonly apps=(
"GoogleJapaneseInput.app:-10"
"zoom.us.app:10"
)
sudo echo -n
@ganta
ganta / update-anyenv.sh
Created December 2, 2019 03:09
Update anyenv envs with lazyload
View update-anyenv.sh
#!/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)
View emacs.rb
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
View emacs.rb
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 / https_sample.rb
Created April 16, 2015 08:28
RubyでのHTTPS接続のサンプル
View https_sample.rb
require 'net/http'
require 'openssl'
host = 'www.google.com'
https = Net::HTTP.new(host, 443)
#https.open_timeout = SYSTEM_TIMEOUT_SEC
#https.read_timeout = SYSTEM_TIMEOUT_SEC
https.use_ssl = true
https.verify_mode = OpenSSL::SSL::VERIFY_PEER
@ganta
ganta / GebConfig.groovy
Created July 31, 2013 16:30
Ghost DriverでUser-Agentを変更する設定
View GebConfig.groovy
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)
@ganta
ganta / gist:6045975
Created July 20, 2013 18:24
MOP hands-on - JGGUG G* Workshop Z Jul 2013
View gist:6045975
String.metaClass.getLanguage = { "Groovy" }
String.metaClass.getLang = { "Groovy" }
assert "JGGUG".language == "Groovy"
assert "JGGUG".lang == "Groovy"