- manifest.json と script.js を適当な、同じディレクトリ内に保存します。
- Chromeの設定画面を開き、拡張機能の画面を出します。
- 「デベロッパーモード」のチェックボックスにチェックを入れます。
- 「パッケージされていない拡張機能を読み込む」ボタンを押し、先程のディレクトリを選択します。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Checks if the device is `rooted` | |
* | |
* @return true if the device is rooted | |
*/ | |
public static boolean isRooted() { | |
if (android.os.Build.TAGS.contains("test-keys")) { | |
return true; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jp.kshoji.watchface; | |
import android.support.annotation.NonNull; | |
import android.text.format.Time; | |
/** | |
* <h2>Time with Offset</h2> | |
* | |
* For example, construct an instance with `new Offset(300);`, | |
* When the real time: `9:00`, this OffsetTime returns `9:05` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyNumberLister { | |
public static void main(String[] args) { | |
for (long i = 0; i < 100000000000L; i++) { | |
String myNumber = String.format("%011d", i); | |
int sum = 0; | |
for (int j = 1; j < 12; j++) { | |
int digit = Integer.parseInt(myNumber.substring(11 - j, 12 - j)); | |
int multiplier = (j < 7) ? j + 1 : j - 5; | |
sum += digit * multiplier; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc -finput-charset=UTF-8 -fextended-identifiers 🍣.c && ./a.out | |
#include <stdio.h> | |
#include <wchar.h> | |
#include <locale.h> | |
#define 😀 setlocale(LC_ALL, ""); | |
#define 👉(x) wprintf(L"%lc", L'鮪' + x) | |
#define 🐟 0 | |
#define 🍵 10 | |
#define 🌀 for | |
#define 🍣🍣🍣 int main() |
- Chromeでslackを閲覧している
- Custom JavaScript for websites を入れる。
- slackのタブを開き、拡張(cjsという文字のアイコン)を開いて、
enable cjs for this host
のチェックボックスにチェックする。 - 下記のスクリプトをコピペして、
save
ボタンを押す。
(毎秒処理するのがなんか微妙…)
34856938471298877281521768684250279520041
is a prime number.
→ to HEX
666F72283B3B29616C65727428277D2729
→ to String
for(;;)alert('}')
It's a crime in Japan!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let cell: number[] = [] | |
let newCell: number[] = [] | |
let dotBrightness: number = 64 | |
function newGeneration() { | |
scrollbit.clear() | |
for (let m = 0; m <= scrollbit.rows() - 1; m++) { | |
for (let o = 0; o <= scrollbit.cols() - 1; o++) { | |
cell[m * scrollbit.cols() + o] = Math.randomRange(0, 1) | |
scrollbit.setPixel(o, m, cell[m * scrollbit.cols() + o] * dotBrightness) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void OnMidiInputDeviceAttached(string deviceId) | |
{ | |
// will be called when a new Input device connected | |
// Input device can receive MIDI events | |
} | |
public void OnMidiOutputDeviceAttached(string deviceId) | |
{ | |
// will be called when a new Output device connected | |
// Output device can send MIDI events |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <MIDI.h> | |
// MIDI Library https://www.arduino.cc/reference/en/libraries/midi-library/ | |
// MIDI Shield https://www.sparkfun.com/products/12898 | |
// Usage: when LED D6 is ON, push D2 button. then 20 kind of MIDI data will send. | |
MIDI_CREATE_DEFAULT_INSTANCE(); | |
byte sysex[] = { 0x01, 0x02, 0x04, 0x08 }; |