const log = console.log.bind(console)
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
{ | |
"title": "美術1#4", | |
"data": [ | |
{ | |
"type": "text", | |
"src": ".use md\n## 色について\n### 三属性\n- 色には、\n - ((色相)) 色合いのこと\n - ((明度)) 明るさ\n - ((彩度)) 鮮やかさ \nの3つの属性がある。\n- 色は、((無彩色))αと((有彩色))βに大きく分けられる。\n- αには、((彩度))や((色相))が無い。\n- 向かい合った2つの色のことを、((補色))と呼ぶ。\n### 三原色\n- ((色光))\n - ((レッド))、((ブルー))、((グリーン))の3つの原色。\n - 重ねるほど((白))くなる。\n - ((加法))混色という。\n- ((色料))\n - ((マゼンダ))、((シアン))、((イエロー))の3つの原色。\n - 重ねるほど、((黒))くなる。\n - ((減法))混色という。\n", | |
"x": 3, | |
"y": 13 | |
}, | |
{ |
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
(function(Scratch) { | |
'use strict'; | |
class Json2Scratch { | |
getInfo () { | |
return { | |
id: 'parse', | |
name: 'Parse', | |
blocks: [ | |
{ |
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
const regIndexes=(regexp:RegExp,text:string):Array<{start,end}>=>{ | |
let array; | |
const result:Array<{start,end}>=[]; | |
while((array=regexp.exec(text))!==null){ | |
result.push({ | |
start:array.index, | |
end:regexp.lastIndex, | |
}); | |
} | |
return result; |
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
# Deno dir | |
/.deno/ |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"SchoolType": "小学校", | |
"NewJobType": "主幹教諭", | |
"NewPlaceName": "千代田区立麹町小学校", | |
"OldJobType": "主幹教諭", | |
"OldPlaceName": "千代田区立千代田小学校", | |
"Name": "服部 香穂里", | |
"Reason": "転任" | |
}, |
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
function objAcsess(obj: object, keys: Array<string|number>, value:any) :any{ | |
let target = obj; | |
keys.slice(0,-1).forEach(key=>{ | |
target = target[key]; | |
}); | |
if(value){ | |
target[keys.at(-1)] = value; | |
} | |
return target[keys.at(-1)]; | |
} |
I hereby claim:
- I am nakasyou on github.
- I am nakasyou (https://keybase.io/nakasyou) on keybase.
- I have a public key whose fingerprint is A83C EA8F 00CA C629 5F3A CFE4 1DB6 DA91 450A 053F
To claim this, I am signing this object:
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
function svg2png(svgURL){ | |
const img = new Image(); | |
return new Promise((resolve)=>{ | |
img.addEventListener('load',()=>{ | |
const canvas = document.createElement('canvas'); | |
canvas.width = img.width; | |
canvas.height = img.height; | |
const ctx = canvas.getContext('2d'); |
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
import { Hono } from "https://deno.land/x/hono/mod.ts" | |
import { serveStatic } from "https://deno.land/x/[email protected]/middleware.ts"; | |
import { serve } from 'https://deno.land/std/http/server.ts' | |
const port = Deno.args.length >= 1 ? Deno.args[0] : 8080 | |
const app = new Hono() | |
app.use("/*",serveStatic()) | |
serve(app.fetch,{ | |
port, |