Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View kyohsuke's full-sized avatar
🇯🇵

KAWAHARA Keisuke kyohsuke

🇯🇵
View GitHub Profile
// ==UserScript==
// @name Auto Refresh Twitter Timeline
// @description Automatically refreshes follow timeline on Twitter.
// @match https://twitter.com/home
// @version 1.8
// @updateURL https://gist.githubusercontent.com/kyohsuke/21c3b0ca532a87a1b3f357dfc94d3f24/raw/twrefresh.user.js
// @downloadURL https://gist.githubusercontent.com/kyohsuke/21c3b0ca532a87a1b3f357dfc94d3f24/raw/twrefresh.user.js
// @icon https://help.twitter.com/content/dam/help-twitter/brand/logo.png
// @grant none
// ==/UserScript==
// https://twitter.com/search?q=lang%3Aja%20filter%3Areplies%20(card_domain%3Abnc.lt%EF%BD%9Ccard_domain%3Afanlink.to%20%EF%BD%9Ccard_domain%3An9oi1.app.link)&src=typed_query&f=live
// ↑ にアクセスして ↓ をコンソールにこぴぺ
const interval = 3000;
function delBnc() {
let tweets = document.evaluate('//article[@data-testid="tweet"]//div[@aria-label="もっと見る"]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
let elem = tweets.snapshotItem(0);
if(elem != null) {
let targetDOMRect = elem.getBoundingClientRect();
@kyohsuke
kyohsuke / twitchRemoveFrontReco.user.js
Last active March 29, 2024 07:11 — forked from dani12817/twitchRemoveFrontReco.user.js
Remove Twitch Recommended
// ==UserScript==
// @name Remove Twitch Front Page Recommended
// @namespace http://tampermonkey.net/
// @version 1.0.2
// @description twitch.tv のトップページにあるレコメンドを停止して削除するヤツ
// @author kyohsuke (based on dani12817's userscript)
// @downloadURL https://gist.github.com/kyohsuke/36737998a25e2ee5583ea4758c708ea7/raw/twitchRemoveFrontReco.user.js
// @updateURL https://gist.github.com/kyohsuke/36737998a25e2ee5583ea4758c708ea7/raw/twitchRemoveFrontReco.user.js
// @match https://www.twitch.tv/*
// @icon https://static.twitchcdn.net/assets/favicon-32-e29e246c157142c94346.png
diff --git a/doc/tags-ja b/doc/tags-ja
index 599c145..cd03870 100644
--- a/doc/tags-ja
+++ b/doc/tags-ja
@@ -2089,7 +2089,6 @@ $quote eval.jax /*$quote*
:XMLent insert.jax /*:XMLent*
:XMLns insert.jax /*:XMLns*
:[range] motion.jax /*:[range]*
-:[vV\x16] autocmd.jax /*:[vV\\x16]*
:\bar cmdline.jax /*:\\bar*
@kyohsuke
kyohsuke / streem.rb
Last active October 13, 2015 02:49
matz/streem for Homebrew
require 'formula'
class Streem < Formula
homepage 'https://github.com/matz/streem'
head 'https://github.com/matz/streem.git'
def install
ENV.j1
system "make && make test"
bin.install "bin/streem"
@kyohsuke
kyohsuke / mruby.rb
Created May 16, 2012 08:41
mruby install formula with Homebrew
require 'formula'
class Mruby < Formula
homepage 'http://www.mruby.org/'
head 'https://github.com/mruby/mruby.git'
def install
ENV.j1
system "make"
system "make test"
@kyohsuke
kyohsuke / build_ricty.sh
Created November 9, 2011 09:53
Auto Build Ricty fonts, But it needs fontforge. It is modified code, that is here: http://d.hatena.ne.jp/yukke112/20110521/1305988867
RICTYURL="http://save.sys.t.u-tokyo.ac.jp/~yusa/fonts/ricty/Ricty-3.1.2.tar.gz"
MIGM1URL="http://sourceforge.jp/frs/redir.php?m=iij&f=%2Fmix-mplus-ipa%2F53389%2Fmigu-1m-20111002.zip"
INCONSURL="http://levien.com/type/myfonts/Inconsolata.otf"
CURDIR=`pwd`
TMPDIR=`mktemp -d`
TMPDIR2=`mktemp -d`
trap "cd $CURDIR; rm -rf $TMPDIR $TMPDIR2" INT HUP QUIT
@kyohsuke
kyohsuke / gist:976232
Created May 17, 2011 10:04
環境変数を波及させるのって、こんな感じだったらいいのかな?
function! s:pushEnv(shname)
if a:shname == 'bash'
let l:envs = split(system('bash -c "source ~/.bashrc; source ~/.bash_profile; export"'))
elseif a:shname == 'zsh'
let l:envs = split(system('zsh -c "source ~/.zshrc; source ~/.zshenv; export"'))
else
return
endif
for l:env in l:envs