Skip to content

Instantly share code, notes, and snippets.

View ci7lus's full-sized avatar
🍜
ラーメン

ci7lus

🍜
ラーメン
View GitHub Profile
@ci7lus
ci7lus / parser.ts
Last active December 3, 2019 15:11
Tweet Entity Parser written in TypeScript / https://is.gd/ltCGV5 (scrapbox.io/ci7lus)
// MIT License - Copyright (c) 2019 ci7lus
const text = Array.from(status.full_text)
const entities = Object.entries(status.entities)
.filter(entity => entity[1])
.flatMap(([entityType, entityArr]) => {
return entityArr.map((entity: any) => {return {entityType, ...entity}})
}) as ({ entityType: string; indices: [number, number], [name: string]: unknown })[]
const slices = Object.fromEntries(entities.map(entity => [entity.indices[0], entity]))
@ci7lus
ci7lus / japanpost.userscript.js
Last active September 17, 2020 01:30
ゆうちょダイレクト オートコンプリートスクリプト https://greasyfork.org/ja/scripts/390584-yucho-autocomplete
// ==UserScript==
// @name YUCHO AUTOCOMPLETE
// @namespace https://ci7lus.github.io
// @version 0.3
// @description ゆうちょダイレクト オートコンプリートスクリプト
// @author ci7l
// @match https://*.jp-bank.japanpost.jp/*
// @grant none
// @license MIT
// @copyright Copyright (c) 2020 ci7lus