アカウントを切り替えた直後に、Twitterのホーム画面へ勝手に移動するのを防ぐTampermonkeyスクリプト。 ここをクリックしてインストールします。
- アカウントを切り替えた直後に、自動的にホーム画面へ移動しそうな場合は、強制的にブラウザバックします。
アカウントを切り替えた直後に、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) { |
| 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'), | |
| }); | |
| } |
楕円の中心から引いた直線と、楕円の円周とが交わる座標を正しく取得する。
| # 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 |
| # Note: リモートから削除されたブランチは自分で消す必要がある | |
| # リモートブランチすべてをループ処理する | |
| git fetch -p && git branch -r | while read remote; do | |
| # ブランチを切り替える | |
| echo "> $ git checkout ${remote#origin/}" | |
| git checkout "${remote#origin/}" | |
| echo | |
| # ブランチをpullする |
秋月電子通商で販売されている「BMX055使用9軸センサーモジュール」を「MicroPython pyboard v1.1」で動かすテストコードです。
販売ページのArduinoサンプルプログラムを移植したものになります。それらしい値は取得できているようですが、元のサンプルプログラムの実行結果と比較できていないため、同じ動作をしているのかは分かりません。