Skip to content

Instantly share code, notes, and snippets.

@sounisi5011
sounisi5011 / README.md
Last active February 10, 2023 16:30
[Tampermonkey] アカウント切替時にTwitterのホーム画面へ移動するのを防ぐTampermonkeyスクリプト

Do not jump to Twitter home!

アカウントを切り替えた直後に、Twitterのホーム画面へ勝手に移動するのを防ぐTampermonkeyスクリプト。 ここをクリックしてインストールします

機能

  • アカウントを切り替えた直後に、自動的にホーム画面へ移動しそうな場合は、強制的にブラウザバックします。
export function pathQuote(pathstr: string): string {
if (!/[\s"'`]/.test(pathstr) && !/^[(<[{]|[)>\]}]$/.test(pathstr)) {
return pathstr;
}
if (/'/.test(pathstr)) {
if (/"/.test(pathstr)) {
if (/`/.test(pathstr)) {
const match = pathstr.match(/<+|>+/g);
if (match) {
@sounisi5011
sounisi5011 / README.md
Last active May 5, 2023 17:47
関西けもケット8で売られたvoreいモノまとめ

関西けもケット8で売られたvoreいモノまとめ

2019年9月22日開催の同人誌イベント【けもケット】にて配布された、vore関係の同人誌やモノのまとめです。

著:sounisi5011 (Twitter / pixiv)
最終更新日時:2021年9月19日 午後5時23分 (更新履歴

注意

  • 「巨大娘やモンスター娘、人間」などの捕食者が丸呑み・捕食を行うvoreモノは含みません。ポケモン・ドラゴン・獣人《ケモノ》などの、人外系voreのみとなります。
@sounisi5011
sounisi5011 / define.ts
Last active August 8, 2019 11:25
Symbol.asyncIterator polyfill
if(!Symbol.asyncIterator) {
Object.defineProperty(Symbol, 'asyncIterator', {
enumerable: false, // This line is optional
configurable: false, // This line is optional
writable: false, // This line is optional
value: Symbol('Symbol.asyncIterator'),
});
}
@sounisi5011
sounisi5011 / README.md
Last active June 2, 2019 11:21
入力項目が自動で増えていく入力欄郡
@sounisi5011
sounisi5011 / README.md
Last active May 5, 2023 17:46
けもケット8で売られたvoreいモノまとめ

けもケット8で売られたvoreいモノまとめ

2019年4月29日開催の同人誌イベント【けもケット】にて配布される予定の、vore関係の同人誌やモノのまとめです。

著:sounisi5011 (Twitter / pixiv)
最終更新日時:2021年9月19日 午後5時24分 (更新履歴

注意

  • 急いで作ったやつなので、場所と書名の確認程度に使ってください。
@sounisi5011
sounisi5011 / README.md
Last active February 5, 2019 04:49
楕円の円周上の座標を求める
@sounisi5011
sounisi5011 / main.py
Last active January 23, 2019 11:17
MicroPythonで「BMX055使用9軸センサーモジュール」のジャイロセンサで「GWSサーボ S03T/2BBMG/F」を駆動するコード
# Control S03T 2BBMG F by 9-axis BMX055 sensor
#
# http://akizukidenshi.com/catalog/g/gM-01968/
# http://akizukidenshi.com/catalog/g/gK-13010/
# https://docs.micropython.org/en/latest/library/pyb.I2C.html
# https://qiita.com/hurusu1006/items/f493ee4eb9998d5bd740
# V+ -------- VCC
# [pyboard] X9 -------- SCL [AE-BMX055] J7 ✓
# X10 -------- SDA
@sounisi5011
sounisi5011 / console-input.sh
Last active January 23, 2019 07:10
git pullですべてのブランチをリモートと同期するコマンド
# Note: リモートから削除されたブランチは自分で消す必要がある
# リモートブランチすべてをループ処理する
git fetch -p && git branch -r | while read remote; do
# ブランチを切り替える
echo "> $ git checkout ${remote#origin/}"
git checkout "${remote#origin/}"
echo
# ブランチをpullする
@sounisi5011
sounisi5011 / README.md
Last active January 23, 2019 10:19
MicroPythonで「BMX055使用9軸センサーモジュール」を駆動するコード

MicroPythonで「BMX055使用9軸センサーモジュール」を駆動するクラス

秋月電子通商で販売されている「BMX055使用9軸センサーモジュール」を「MicroPython pyboard v1.1」で動かすテストコードです。

販売ページArduinoサンプルプログラムを移植したものになります。それらしい値は取得できているようですが、元のサンプルプログラムの実行結果と比較できていないため、同じ動作をしているのかは分かりません。

使用方法