Skip to content

Instantly share code, notes, and snippets.

@abcang
abcang / .zshrc
Created April 9, 2016 10:33
ssh先の場合tmux自動起動するやつ。.zshrcとかに入れると便利。tmuxをデタッチするとssh終了するか聞かれるので便利
## ssh先の場合tmux自動起動
if [[ -n "${REMOTEHOST}${SSH_CONNECTION}" && -z "$TMUX" && -z "$STY" ]] && type tmux >/dev/null 2>&1; then
function confirm {
MSG=$1
while :
do
echo -n "${MSG} [Y/N]: "
read ans
case $ans in
[yY]) return 0 ;;
@abcang
abcang / twitter-pwa-single-column.user.js
Last active October 25, 2023 15:38
Twitter PWA Single Column
// ==UserScript==
// @name Twitter PWA Single Column
// @namespace https://gist.github.com/abcang/b7dea73a9a6f64990f695e9909ca9027/raw/twitter-pwa-single-column.user.js
// @version 0.3
// @description TwitterのPWAを1カラムで使いやすくする
// @author abcang
// @match https://twitter.com/*
// @grant none
// @downloadURL https://gist.github.com/abcang/b7dea73a9a6f64990f695e9909ca9027/raw/twitter-pwa-single-column.user.js
// @updateURL https://gist.github.com/abcang/b7dea73a9a6f64990f695e9909ca9027/raw/twitter-pwa-single-column.user.js
@abcang
abcang / twitter-pwa-narrow-width.user.js
Last active February 11, 2023 10:10
Twitter PWA Narrow Width
// ==UserScript==
// @name Twitter PWA Narrow Width
// @namespace https://gist.github.com/abcang/8088f536bc5473491e41eb2b786d24a5/raw/twitter-pwa-narrow-width.user.js
// @version 0.1
// @description TwitterのPWAの画面幅を狭くする
// @author abcang
// @match https://twitter.com/*
// @grant none
// @downloadURL https://gist.github.com/abcang/8088f536bc5473491e41eb2b786d24a5/raw/twitter-pwa-narrow-width.user.js
// @updateURL https://gist.github.com/abcang/8088f536bc5473491e41eb2b786d24a5/raw/twitter-pwa-narrow-width.user.js
@abcang
abcang / azpainter.diff
Last active December 28, 2020 12:22
azpainter.diff
diff --git desktop/icons/hicolor/scalable/apps/azpainter.svg desktop/icons/hicolor/scalable/apps/azpainter.svg
index 023e08a..d2dc659 100755
--- desktop/icons/hicolor/scalable/apps/azpainter.svg
+++ desktop/icons/hicolor/scalable/apps/azpainter.svg
@@ -167,7 +167,7 @@
x="20.971798"
y="560.68152"
sodipodi:insensitive="true"
- ry="44.807964"
+ ry="0"
@abcang
abcang / gist:45d3c8b9ed9080364d02217fba583a73
Created April 4, 2017 16:25
adblockでブラックリスト方式にするためのカスタムフィルタ
@@*$document,domain=~example.com|~example.jp|~example.org
@abcang
abcang / checklist.md
Last active October 3, 2018 17:32
VTuberファン 実績チェックテンプレート

YouTube編

  • 動画を見たことがある
  • チャンネル登録をしている
  • 高評価ボタンを押したことある
  • 動画もしくはライブでコメントしたことがある
  • スパチャを送ったことがある

Twitter編

  • フォローしている
  • いいねしたことがある
@abcang
abcang / capture_sample.js
Last active September 12, 2018 02:58
Headless Chromeを使った画面キャプチャのサンプル
const { Launcher } = require('chrome-launcher');
const CDP = require('chrome-remote-interface');
const util = require('util');
const fs = require('fs');
const writeFile = util.promisify(fs.writeFile);
async function setDeviceSize(Emulation, deviceMetrics) {
const { width, height } = deviceMetrics;
await Emulation.setDeviceMetricsOverride(deviceMetrics);
@abcang
abcang / wikiwiki_external_link.user.js
Last active July 24, 2018 15:19
wikiwiki external link
@abcang
abcang / mirrativ_keyboard_shortcut.user.js
Last active June 27, 2018 16:26
Mirrativにキーボードショートカットを追加するUserScript
// ==UserScript==
// @name Mirrativ keyboard shortcut
// @description Mirrativにキーボードショートカットを追加するUserScript
// @namespace https://gist.github.com/abcang/ceb4c4be3ee7ec49d6d782b88e803e50/raw/mirrativ_keyboard_shortcut.user.js
// @version 0.1
// @author abcang
// @match https://www.mirrativ.com/*
// @grant none
// @downloadURL https://gist.github.com/abcang/ceb4c4be3ee7ec49d6d782b88e803e50/raw/mirrativ_keyboard_shortcut.user.js
// @updateURL https://gist.github.com/abcang/ceb4c4be3ee7ec49d6d782b88e803e50/raw/mirrativ_keyboard_shortcut.user.js
@abcang
abcang / hoge.md
Created April 20, 2018 14:33
TabやEnterの挙動

入力内容

英数 → # → かな → → Tab → Enter

Mac + Chrome + Google IME


{"type":"keyup","keyCode":13,"which":13,"key":"Enter","code":"Enter","isComposing":false}
{"type":"compositionend","which":0}