| name | deno | ||||
|---|---|---|---|---|---|
| description | Rules for using Deno | ||||
| metadata |
|
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 CryptID from "https://esm.sh/@cryptid/cryptid-js/lib/node/js/index.js"; | |
| (async function main() { | |
| const instance = await CryptID.getInstance(); | |
| const setupResult = instance.setup(CryptID.SecurityLevel.LOWEST); | |
| if (!setupResult.success) { | |
| console.log('Failed to setup :('); | |
| return; |
usage of @remix-run/component
updated_at: 2026-02-05 00:00 +09:00 gist
How to save & load skills from my gist
updated_at: 2026-02-04 13:26 +09:00 gist
usage of @remix-run/interaction
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 { createCache } from "jsr:@deno/cache-dir"; | |
| import { McpServer } from "npm:@modelcontextprotocol/sdk/server/mcp.js"; | |
| import { StdioServerTransport } from "npm:@modelcontextprotocol/sdk/server/stdio.js"; | |
| import { z } from "npm:zod"; | |
| const { load } = createCache(); | |
| function isUint8Array(arg: string | Uint8Array): arg is Uint8Array { | |
| return arg.constructor === Uint8Array; | |
| } |
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
| require 'set' | |
| Yamanote = %w[ใจใใใใ ใใใใใกใใ ใใใฐใ ใฏใพใพใคใกใใ ใใพใก ใใชใใ ใใใใ ใใใใ ใใใ ใใณใ ใใถใ ใฏใใใ ใ ใใใ ใใใใ ใ ใใใใใใผ ใใใ ใฎใฐใฐ ใใใ ใใใถใใ ใใใคใ ใใใ ใใพใใ ใใฐใ ใซใใซใฃใฝใ ใซใฃใฝใ ใใใใใ ใซ ใใใฎ ใใใกใพใก ใใใฏใฐใ ใใใ ] | |
| Station = Struct.new(:name, :val) | |
| class Loop | |
| def initialize(array) | |
| @array = array.map do |a| | |
| if a.is_a? Station |
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
| module HttpUtil | |
| class PathSegment < String | |
| MATCHER = Regexp.new("\\A#{URI::RFC3986_Parser::SEG_NC}+\\Z") | |
| def self.encode_from(str, allow_slash: false) | |
| return str if str.is_a?(PathSegment) | |
| raise 'should not include / in element or use allow_slash option to encode' if !allow_slash && str.include?('/') | |
| new(URI.encode_uri_component(str.unicode_normalize(:nfkc))) | |
| end | |
| def initialize(str) | |
| raise "invalid char: #{str}" unless MATCHER.match?(str) |
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
| RSpec.configure do |config| | |
| config.before(:suite) { Coverage.start(oneshot_lines: true) } | |
| config.after :suite do | |
| coverage_data = Coverage.result(stop: true, clear: true) | |
| uncovered_lines(coverage_data) | |
| end | |
| end | |
| def parse_git_diff(base_branch) | |
| diff_output, _stderr, _status = Open3.capture3("git diff #{base_branch} --unified=0") |
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
| # frozen_string_literal: true | |
| run "heroku create #{@app_name}" | |
| gem "pg" | |
| file "config/database.yml", <<~CODE | |
| development: &psql | |
| adapter: postgresql | |
| database: #{@app_name} | |
| pool: 5 |
NewerOlder