Skip to content

Instantly share code, notes, and snippets.

View sheepla's full-sized avatar
🐑
メェ〜

sheepla sheepla

🐑
メェ〜
View GitHub Profile
@Hayao0819
Hayao0819 / jirou.ts
Created December 20, 2023 08:06
ラーメン二郎の型定義
export type MenuAmount = "マシ" | "多め" | "マシマシ" | "かなり多め" | "普通" | "少なめ" | "無し";
export type IsGarlicAdded =
| "全てマシ"
| "全て普通"
| "全て少なめ"
| {
ニンニク?: MenuAmount;
ヤサイ?: MenuAmount;
アブラ?: MenuAmount;
@RyushiAok
RyushiAok / FsFizzBuzz.fsx
Created December 5, 2023 03:43
FsFizzBuzz.fsx
let (|Fizz|_|) n = if n % 3 = 0 then Some "Fizz" else None
let (|Buzz|_|) n = if n % 5 = 0 then Some "Buzz" else None
let (|FizzBuzz|_|) n =
if n % 15 = 0 then Some "FizzBuzz" else None
let fizzBuzz =
function
| FizzBuzz fizzbuzz -> fizzbuzz
| Fizz fizz -> fizz
@AWtnb
AWtnb / sushi-yunomi.ps1
Created November 12, 2023 03:21
寿司屋の湯呑に使えそうな魚偏の漢字を出力
0x9b5a..0x9ce4|% {[char]::ConvertFromUtf32($_)}
@RyushiAok
RyushiAok / markdown.fs
Created October 18, 2023 15:03
F# Markdown Builder
type Block =
| H1 of string
| H2 of string
| P of string
type Markdown = {
title: string
author: string
blocks: Block list
} with
@RyushiAok
RyushiAok / unko_builder.fs
Created October 9, 2023 12:56
uncode💩
type NextChar = NextChar
type NextWidth = NextWidth of char
type NextHeight = NextHeight of char * int
type EndUnnko = EndUnnko of char * int * int
type UnnkoBuilder () =
member _.Yield(_: unit) = NextChar
member _.Run(EndUnnko (char, w, h): EndUnnko) =
let nChars n c = c |> Array.replicate n |> System.String
printfn "%s∫ ∫ ∫ " <| nChars h ' '
printfn "%sノヽ " <| nChars h ' '
@Hayao0819
Hayao0819 / destroy.sh
Last active June 22, 2023 17:35
シェル芸ロシアンルーレット
#!/bin/sh
# 参考
# https://qiita.com/_-_-_-_-_/items/214d537aae2c1488692c
get_random(){
od -v -An --width=1 -tu1 -N1 < /dev/urandom | \
awk "{ print \$1 % 10 }"
}
@greymd
greymd / SCP-OJI-CHAT.md
Created March 30, 2023 21:51
SCP-OJI-CHAT

項目番号: SCP-OJI-CHAT

オブジェクトクラス: Safe

特別収容プロトコル: SCP-OJI-CHATは、財団所有の非接続コンピュータ上で保管されます。このソフトウェアの使用は、研究および検証目的に限定され、公式の財団コミュニケーションでの使用は禁止されています。SCP-OJI-CHATを使用する際は、権限を持つ研究者の監督下で行う必要があります。

説明: SCP-OJI-CHATは、「おじさん構文」と呼ばれる特徴的な文章を生成するソフトウェアです。このソフトウェアは、一般的な日本語の文法や慣用句に基づいて、独特な口調や文体で文章を作成します。生成される文章は、中年男性の親しみやすい口調や文体で、しばしば語尾に長音記号や絵文字が使用されることが特徴です。SCP-OJI-CHATは、特定の年齢層や文化背景に関連する表現を適切に使用し、受け手に独特な印象を与えます。

SCP-OJI-CHATは、感情や状況に応じた文章のバリエーションを生成する能力を持っています。これにより、ユーザーが与えられたシチュエーションに適した「おじさん構文」の文章を得ることができます。ただし、SCP-OJI-CHATはあくまでソフトウェアであり、自律的な意識や意志を持たないため、オブジェクトクラスSafeに分類されています。

@Comamoca
Comamoca / onimai.md
Last active November 27, 2023 01:04
flowchart TB
A[あり] --> B[なし] --> B
B --> A
A --> C[ついて] --> E[] --> C
C --> D[ない] --> F[あれ]
F --> G[どっち] --> G
G --> I[trans] --> I
I --> I
I --&gt; I
@TwoSquirrels
TwoSquirrels / 画像保存ブックマークレット.md
Last active July 23, 2023 11:42
画像保存ブックマークレット

画像保存ブックマークレット

This bookmarklet downloads up to four images from a Twitter page, and names them based on the username, tweet ID, and image number. It only works on Twitter pages and will throw an error if run on a different website.

Bookmarklet

javascript:(async()=>{if(location.hostname.match(/\.?twitter\.com$/)){let[,t,,e]=location.pathname.split("/");return[...document.getElementsByTagName("img")].filter(t=>t.src.startsWith("https://pbs.twimg.com/media/")).slice(0,4).map((a,c)=>({url:a.src.replace(/&name=.+/,""),name:`Title-twitter-${t}-${e}-${c+1}.jpg`}))}throw Error("This page is not supported.")})().then(t=>t.forEach(async({url:t,name:e})=>{let a=document.createElement("a");a.href=URL.createObjectURL(await (await fetch(t,{mode:"cors"})).blob()),a.download=e,a.click()})).catch(t=>alert(t))
@haruki7049
haruki7049 / unko.hs
Created October 20, 2022 00:53
うんこの量が多すぎる!!
unkoJudge :: Double -> String
unkoJudge volume
| volume <= 10.0 = "Too little..."
| volume <= 20.0 = "Uh... OK. It may be safe."
| otherwise = "Oh!! Your unko is very big!!! You are LEGEND!!!"