Skip to content

Instantly share code, notes, and snippets.

@agektmr
agektmr / karabinar_JIS_ASCII.json
Created August 19, 2017 14:09
Converts JIS keyboard layout to ASCII keyboard layout in Karabinar Elements
{
"title": "For Japanese (JIS配列をASCII配列風にする設定)",
"rules": [
{
"description": "英数・かなキーを他のキーと組み合わせて押したときに、コマンドキーを送信する。",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "japanese_eisuu",
API/payment method Chrome Edge Safari Samsung Internet Firefox
@agektmr
agektmr / one-time-code.md
Last active September 11, 2020 09:58
`input[autocomplete="one-time-code"]` polyfill using Web OTP API
if ('customElements' in window && 'OTPCredential' in window) {
  customElements.define("web-otp",
    class extends HTMLInputElement {
      connectedCallback() {
        this.abortController = new AbortController();
        this.receive(); 
      }
      disconnectedCallback() {
 this.abort();
@agektmr
agektmr / Apps Script to insert Atom Feed into Google Spreadsheet
Last active September 16, 2021 21:41
This script will fetch an Atom feed and insert rows on top in descending order. Make sure to replace with arbitrary URLs on 2 placeholders.
function main() {
var ss = SpreadsheetApp.openByUrl('YOUR SPREADSHEET URL COMES HERE');
var sheet = ss.getSheets()[0];
var property = PropertiesService.getDocumentProperties();
var last_update = property.getProperty('last_update');
last_update = last_update === null ? 0 : parseFloat(last_update);
var feed = fetch('ATOM FEED URL COMES HERE');
var items = getItems(feed);
@agektmr
agektmr / gif animation using html5
Last active September 16, 2022 08:13
How to create gif animation
<html>
<head>
<style>
figure {
width: 200px;
height: 150px;
text-align: center;
float: left;
}
img {