Skip to content

Instantly share code, notes, and snippets.

@naosim
naosim / note.txt
Created March 22, 2024 13:32
てすと
テストだよ
@naosim
naosim / gridjs_sample.html
Created May 1, 2024 03:08
gridjsサンプル
<!DOCTYPE html>
<html lang="en">
<head>
<link
href="https://unpkg.com/gridjs/dist/theme/mermaid.min.css"
rel="stylesheet"
/>
</head>
<body>
<div id="wrapper"></div>
@naosim
naosim / メモ.txt
Created June 24, 2024 23:00
メモ
自身の技術専門職について発表する際に、聞き手が知りたがるであろう疑問や問いを以下のように箇条書きで示します:
技術専門職としての役割や責任は何ですか?
最近取り組んでいるプロジェクトや課題は何ですか?
業務上の課題や障害にどのように対処していますか?
最新の技術トレンドや業界の動向をどのように把握していますか?
チームとのコラボレーションやコミュニケーションはどのように行っていますか?
今後の展望やキャリアパスについてどのような考えがありますか?
技術やスキルの向上のために何をしていますか?
他の部署や職種との連携や協力体制はどのように構築していますか?
@naosim
naosim / post-slack-with-image.js
Created July 23, 2024 20:26
slackに画像を送る
import { IncomingWebhookClient } from 'https://unpkg.com/@slack/webhook@latest/dist/cjs/index.js';
import fs from 'fs';
const url = 'YOUR_SLACK_WEBHOOK_URL'; // Incoming Webhook URL
const channel = '#general'; // 送信先チャンネル
const message = '画像を送信します'; // メッセージ
const filePath = 'image.jpg'; // 送信する画像ファイルのパス
(async () => {
@naosim
naosim / screenshot-on-chome.js
Created July 23, 2024 20:33
起動中のchromeでカレンダーを表示してスクショする
// chromeを起動する
// "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir=remote-profile
import puppeteer from 'puppeteer';
// Or import puppeteer from 'puppeteer-core';
// Launch the browser and open a new blank page
// const browser = await puppeteer.launch();
const browser = await puppeteer.connect({
browserURL: 'http://127.0.0.1:9222',
@naosim
naosim / product-order.md
Created September 16, 2024 21:33
商品と注文モデル
classDiagram
namespace domain-runtime-DeliveredProduct {
class DeliveredProduct["DeliveredProduct
納入商品"] {
  
DeliveredProductId 納入商品ID
OfferSpec.OfferSpecId オファー仕様ID
User.UserId ユーザID
ServiceContract.ServiceContractId サービス契約ID
@naosim
naosim / microStudio-js-matter.js
Created September 28, 2024 08:48
【microStudio】javascript + matter.js
// https://microstudio.dev/documentation/Matter/
var engine;
var ground;
var box;
init = function() {
engine = Matter.Engine.create();
engine.world.gravity.y = -1;
ground = Matter.Bodies.rectangle(0, -50, 200, 10, {isStatic: true});
Matter.Composite.add(engine.world, ground);
box = Matter.Bodies.rectangle(0, 50, 20, 20);
@naosim
naosim / microStudio-js-cheatcommand.js
Created October 2, 2024 21:17
【microStudio】裏技の実装(コナミコマンド)
class CheatCommand {
cheatCommandDef = "uuddlrlrba" // コナミコマンド
initKeys;
inputKeys;
isCheatCompleted = false;
init() {
this.initKeys = this.cheatCommandDef.split("").map(v => "-").join("");
this.inputKeys = this.initKeys;
}
update() {
@naosim
naosim / fromEntries.js
Created October 3, 2024 21:33
fromEntries
const text = "name=naosim,point=10,state=4"
const result = text.split(",").reduce((memo, v) => {
const [key, value] = v.split("=");
return {...memo, [key]:value};
}, {})
console.log(result);
const result2 = Object.fromEntries(text.split(",").map(v => v.split("=")))
console.log(result2);
@naosim
naosim / GameObjects.js
Created October 11, 2024 22:57
【microStudio】小要素を管理するオブジェクト
class GameObjects {
children = new Set();
constructor() {
this.children = new Set();
}
add(child) {
this.children.add(child);
}
remove(child) {