This file contains 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 {format} from "https://deno.land/[email protected]/datetime/mod.ts"; | |
import {basename, dirname} from "https://deno.land/[email protected]/path/mod.ts"; | |
const args = Deno.args; | |
if (args.length === 0) { | |
console.log("No arguments provided"); | |
Deno.exit(1); | |
} |
This file contains 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 { encode } from "https://deno.land/[email protected]/encoding/base32.ts"; | |
import { blake2b } from "https://esm.sh/[email protected]"; | |
import { DateTime } from "https://esm.sh/[email protected]"; | |
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts"; | |
function base32(payload: Uint8Array) { | |
return encode(payload).replace(/=/g, "").toLowerCase(); | |
} | |
function blake2b256(payload: string) { | |
return blake2b(payload, undefined, 32); |
This file contains 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 hashrock.study.swing; | |
import org.assertj.swing.core.GenericTypeMatcher; | |
import org.assertj.swing.edt.GuiActionRunner; | |
import org.assertj.swing.fixture.FrameFixture; | |
import org.assertj.swing.junit.testcase.AssertJSwingJUnitTestCase; | |
import org.assertj.swing.timing.Condition; | |
import org.junit.Test; | |
import static org.assertj.swing.timing.Pause.pause; | |
import static org.assertj.swing.timing.Timeout.timeout; |
This file contains 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
//from https://qiita.com/skryoooo/items/a37455bef54321a6195a | |
//変更内容:関数化とconst化 | |
function saveSvgAsPng(el) { | |
const svgData = new XMLSerializer().serializeToString(el); | |
const canvas = document.createElement("canvas"); | |
canvas.width = el.width.baseVal.value; | |
canvas.height = el.height.baseVal.value; | |
const ctx = canvas.getContext("2d"); |
This file contains 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 { serve } from "https://deno.land/[email protected]/http/server.ts"; | |
import React from "https://dev.jspm.io/react"; | |
import ReactDOMServer from "https://dev.jspm.io/react-dom/server"; | |
const s = serve(":8000"); | |
const hello: string = "Hello" | |
const View = (props) => | |
<div className="deno">{hello}, {props.msg}</div>; | |
window.onload = async () => { |
This file contains 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 Vue = require("vue"); | |
const createRenderer = require("vue-server-renderer").createRenderer; | |
const compiler = require("vue-template-compiler"); | |
const renderToString = createRenderer().renderToString; | |
var App = { | |
template: `<div> | |
<div v-for="item in items">{{item}}</div> | |
</div>`, | |
data() { |
This file contains 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
from m5stack import * | |
import utime | |
import math | |
cnt = 0 | |
m_cnt = cnt | |
start = False | |
done = False | |
def init(): |
This file contains 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 * as ws from "https://deno.land/std/ws/mod.ts"; | |
//TODO 有効なChromeのパスを探す | |
const chrome = | |
"/opt/homebrew-cask/Caskroom/google-chrome/latest/Google Chrome.app/Contents/MacOS/Google Chrome"; | |
async function main() { | |
const dirName = await Deno.makeTempDir({ prefix: "deno_chrome_temp" }); | |
const width = 400; | |
const height = 400; |
This file contains 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 React from "react"; | |
import ReactDOM from "react-dom"; | |
const Circle = () => { | |
const [position, setPosition] = React.useState({ | |
x: 100, | |
y: 100, | |
active: false, | |
offset: { } | |
}); |
This file contains 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 functions = require("firebase-functions"); | |
const app = require("express")(); | |
const svgContent = "image/svg+xml; charset=utf-8"; | |
function resetHMS(d) { | |
d.setHours(0); | |
d.setMinutes(0); | |
d.setSeconds(0); | |
d.setMilliseconds(0); |
NewerOlder