Skip to content

Instantly share code, notes, and snippets.

View arayaryoma's full-sized avatar
🏠
Working from home

araya arayaryoma

🏠
Working from home
View GitHub Profile
¥begin{figure}[htbp]
¥begin{minipage} {0.5¥hsize}
¥begin{center}
¥includegraphics[width=8cm,keepaspectratio]{.eps}
¥caption{}
¥label{fig:}
¥end{center}
¥end{minipage}
¥begin{minipage}{0.5¥hsize}
¥begin{center}
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをんァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶ、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈〉《》「」『』【】+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓 亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸
@arayaryoma
arayaryoma / pixiv-checkbox-tool.js
Created October 16, 2017 06:17
Check all checkboxes in your bookmark page of Pixiv
for(const i of document.querySelectorAll('.image-item .input-container input[name="book_id[]"]')) {
i.click()
}
@arayaryoma
arayaryoma / index.ts
Created May 3, 2018 08:14
How to use nanoid with TypeScript
import nanoid from 'nanoid';
console.log(nanoid());
@arayaryoma
arayaryoma / google-forms-to-slack.js
Last active August 15, 2018 09:26
EN: Google App Script to send answers of google forms to Slack (Incoming Webhook) / JA: Google Formsの回答をSlackのIncoming Webhookを使ってSlackに通知するGAS
function onFormSubmit(event) {
try {
var itemResponses = event.response.getItemResponses();
var fields = [];
for(var i = 0; i < itemResponses.length; i++) {
var itemResponse = itemResponses[i];
var title = itemResponse.getItem().getTitle();
var res = itemResponse.getResponse();
fields.push(generateAttachmentField(title, res));
}
@arayaryoma
arayaryoma / break-points.styl
Created December 27, 2018 10:19
Stylus file to define break-points for responsive web sites
$xs-max = 575px
$sm-min = 576px
$sm-max = 767px
$md-min = 768px
$md-max = 991px
$lg-min = 992px
$lg-max = 1199px
$xl-min = 1200px
xs-screen()
@arayaryoma
arayaryoma / README.md
Last active March 19, 2019 12:55
国土交通省が公開しているAPI( http://www.land.mlit.go.jp/webland/api.html )から市区町村のコードを全都道府県分取得してjsonにする

How to use

node ./city-search.js > result.json
const readdirRecursively = async (dir, files = []) => {
const dirents = await fsPromises.readdir(dir, {withFileTypes: true});
const dirs = [];
for (let dirent of dirents) {
if (dirent.isDirectory()) dirs.push(`${dir}/${dirent.name}`);
if (dirent.isFile()) files.push(`${dir}/${dirent.name}`);
}
for (let d of dirs) {
files = readdirRecursively(d, files)
}
@arayaryoma
arayaryoma / hotReload.ts
Created October 28, 2019 17:36
A background script to enable hot reloading for chrome extension development
const filesInDirectory = async (dir: DirectoryEntry): Promise<File[]> => {
return new Promise(async resolve => {
const entries = await readEntries(dir)
return Promise.all(
entries
.filter(e => e.name[0] !== '.')
.map(e => {
if (isDir(e)) {
return filesInDirectory(e)
} else if (isFile(e)) {
@arayaryoma
arayaryoma / asyncForEach.ts
Created November 14, 2019 14:53
Frequently used utility functions for TypeScript
const asyncForEach = async <T>(array: T[], callback: (item: T, index?: number) => Promise<unknown>): Promise<void> => {
for (let i = 0; i < array.length; i++) {
await callback(array[i], i);
}
return
};