Skip to content

Instantly share code, notes, and snippets.

View Comamoca's full-sized avatar
💭
🍜

Comamoca Comamoca

💭
🍜
View GitHub Profile
@Comamoca
Comamoca / flake.nix
Created March 26, 2025 13:52
An example flake for build latest gleam.
{
description = "An example flake for build latest gleam.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
systems.url = "github:nix-systems/default";
devenv.url = "github:cachix/devenv";
rust-overlay.url = "github:oxalica/rust-overlay";
};

バージョン管理の基礎

現代のソフトウェア開発では、プログラムなどのテキストファイルを管理する方法としてバージョン管理ソフトウェアが使われる事が一般的となっている。

バージョン管理を使うことで、

  • 変更の巻き戻し
  • 複数人での開発

等が容易になる。

@Comamoca
Comamoca / firehose.ts
Created October 20, 2024 22:00
Blueskyのfirehoseを取得するスクリプト
/*
よくある投稿がダーッと流れてくるアレができるスクリプトです。
Denoで実行することを想定しています。
2024/10/21 現在動くコードです。
Blueskyはライブラリの変更が激しいのでこのスクリプトも参考程度に読むことをお勧めします。
*/
import { cborDecodeMulti } from "npm:@atproto/common";
import { AtpAgent } from "npm:@atproto/api";
@Comamoca
Comamoca / u149.sql
Last active June 19, 2024 21:57
U149メンバーのSQL Schema。SQLの試し書きやサンプルコードなどにどうぞ。公式サイトとPixiv百科事典の情報を元にしています。順次情報を増やしていく予定です。
create table idols
(
name text,
age integer,
height integer
);
INSERT INTO idols (name, age, height) VALUES
('橘ありす', 12, 141),
('櫻井桃華', 12, 145),
@Comamoca
Comamoca / single-binary-languages.md
Last active May 13, 2024 11:53
シングルバイナリになる言語一覧
  • C

    手続き型の汎用高水準言語。
    ライブラリを静的リンクすることでシングルバイナリを生成できる。

  • C++

  • C#

const str = `
⠀⠀⠀⠀⠀⠀⠀⣤⣤⣤⣤⣤⣤⡄⠀⠀⣀⣤⣤⣤⣤⡄⠀⠀⠀⣀⣤⣤⣤⣤⡀⠀⠀⠀⣀⣤⣤⣤⣤⡀⠀⠀⣀⡀⠀⣠⣶⠆⣴⡖⠀⣀⡀⠀⢀⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⡄
⠀⠀⠀⠀⠀⢀⣼⡿⠉⠉⠉⠉⠉⠀⣠⣾⡿⠋⠉⠙⣿⡿⠀⣠⣾⠟⠋⠉⢹⣿⡇⠀⣠⣾⠟⠋⠉⢹⣿⡇⠀⠀⣿⣷⣠⣿⠃⣼⣟⣤⡾⠟⠁⢀⣾⡟⠉⠉⣹⡿⠉⠉⢉⣿⠏⠀
⠀⠀⠀⠀⣠⣾⣿⣶⣶⣶⣦⠀⠀⣴⣿⠋⠀⠀⠀⣸⣿⢇⣼⡿⠃⠀⠀⠀⣼⣿⢃⣾⡿⠁⠀⠀⠀⣾⣿⠁⠀⠀⠛⣩⣿⢃⣾⣟⣝⠋⠀⠀⢀⣾⣟⣀⣀⣴⣿⣁⣀⣠⣿⠏⠀⠀
⠀⠀⠀⠀⠛⠋⠁⠀⠀⣿⡿⠀⣼⣿⠃⠀⠀⢀⣼⣿⠋⣾⣿⠁⠀⠀⣀⣼⡿⢃⣾⡿⠁⠀⠀⢀⣾⡿⠁⣴⣶⠾⣿⡿⢃⣾⡟⠙⣿⣷⠄⢀⣾⠟⠛⠛⠛⠛⠛⠛⢻⣿⠏⠀⠀⠀
⠀⠀⣰⣶⣆⣀⣀⣤⣾⠟⠁⣰⣿⣯⣀⣀⣤⣾⠟⠁⣸⣿⣧⣀⣀⣴⣿⠟⠁⢸⣿⣇⣀⣀⣴⣿⠟⠀⠈⣁⣤⣾⠟⣀⣾⠏⠀⣀⣾⠄⣠⣾⠏⠀⠀⠀⠀⠀⠀⣠⣿⠏⠀⠀⠀⠀
⠀⠀⠈⠛⠿⠿⠛⠋⠁⠀⠀⠀⠛⠿⠿⠛⠋⠁⠀⠀⠈⠛⠿⠟⠛⠋⠀⠀⠀⠈⠛⠿⠟⠛⠉⠀⠀⣶⡿⠟⠋⠀⠀⠾⢿⣷⠾⠿⠋⣠⣿⠏⠀⠀⠀⠀⠸⠿⠶⠿⠋⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣤⢤⣄⠀⣠⣶⠦⠀⠀⠀⠀⠀⠰⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡴⢟⣯⣄⣸⣿⣷⠿⠥⣴⣾⠄⠀⠀⠀⣴⡿⠋⠀⠀⠀⠀⠀⠀⠀⢀⣿⡆⠀⠀⠀⠀⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⣼⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
import { join } from "https://deno.land/[email protected]/path/mod.ts";
console.log(`import.meta.url: ${import.meta.url}`);
console.log(`Deno.cwd: ${Deno.cwd()}`)
const modPath = join(Deno.cwd(), "haru.config.ts")
console.log(`modPath: ${modPath}`)
const mod = await import(modPath)
FROM rust:latest
WORKDIR /build
RUN git clone https://github.com/gleam-lang/gleam
RUN cd gleam \
&& cargo build --release \
&& cp ./target/release/gleam /bin
const tipichapa = ["チピチピ", "チャパチャパ", "ドゥビ ドゥビ", "ダバ ダバ"]
const dubi = "マヒコミ ドゥビ ドゥビ\nブン ブン ブン ブン"
while (true) {
const word = Array.from({length: 4}, () => tipichapa[Math.floor(Math.random() * tipichapa.length)]).join("")
console.log(word)
if (word == tipichapa.join("")) {
break
}
#r "nuget: Spectre.Console, 0.48.1-preview.0.28"
#r "nuget: FsSpectre, 0.4.6"
open Spectre.Console
open FsSpectre
let wa = "[#eb6ea6]わ[/]"
let nn = "[#c86fab]ん[/]"
let da = "[#5fbfb7]だ[/]"
let fu = "[#fdd000]ふ[/]"