Skip to content

Instantly share code, notes, and snippets.

View Hayao0819's full-sized avatar

Yamada Hayao Hayao0819

View GitHub Profile
@Hayao0819
Hayao0819 / PKGBUILD
Last active April 1, 2022 06:52
r8168-dkms for linux 5.17
# Maintainer: René Wagner <rwa at clttr dot info>
# Contributor: Juan Simón <play4pro at protonmail dot com>
# Contributor: alium
# Contributor: angelsl
# Contributer: hayao <[email protected]>
_pkgbase=r8168
pkgname=${_pkgbase}-dkms
pkgver=8.049.02
pkgrel=1
@Hayao0819
Hayao0819 / gistrge
Last active February 26, 2022 08:38
Gistをファイルストレージとして使用します
#!/usr/bin/env bash
#-- Load library --#
source /dev/stdin < <(curl -sL https://raw.githubusercontent.com/Hayao0819/FasBashLib/8635525f6a8079786dfa039342ad818be942d606/fasbashlib.sh)
GITHUB_TOKEN=""
Command=""
#-- Functions --#
@Hayao0819
Hayao0819 / bug-struct.sh
Created January 27, 2022 11:10
V Bug about struct and enum
#!/usr/bin/env bash
mkdir "./teststruct"
cat > "./bug-struct.v" << EOF
import teststruct as ts
fn main(){
mut c := ts.Color{
color: ts.ColoList.black
@Hayao0819
Hayao0819 / parseopt.v
Last active January 24, 2022 12:14
GNU getoptのようなものをV Langで書いた
import os
import regex
// textがptnに完全に一致した場合にtrueを返す
fn grepq(ptn string, text string) (bool){
mut re := regex.regex_opt(ptn) or {exit(1)}
result := re.matches_string(text)
return result
}
// in_textのptnに一致した部分をrepl_textに置き換えます
@Hayao0819
Hayao0819 / sin.py
Created January 15, 2022 05:28
正弦波を点で正負2つ表示
#!/usr/bin/env python3
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.animation as animation
from fractions import Fraction as fract
# from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure(figsize=[16,9])
@Hayao0819
Hayao0819 / sin.py
Last active January 15, 2022 05:29
正弦波を点で表示
#!/usr/bin/env python3
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.animation as animation
from fractions import Fraction as fract
# from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure(figsize=[16,9])
@Hayao0819
Hayao0819 / shsh.sh
Last active January 29, 2022 13:39
竹林人間のSHSH Checker ワンライナーバージョン
# 完全実装版
curl -s https://shsh.host | tail -n 3 | head -n 1 | sed 's/var signed_array =//g; s|</script>||g; s|;||g' | jq -cr '."iPad6,11"' | tr -d "{" | tr -d "}" | tr "," "\n" | tr -d "\"" | awk -F : 'BEGIN {print "SHSH checker"} {print " "$1 " " $2} END{print "以上" NR "個のSHSHが取得可能です"}'
# ツイート用短縮版(Zshでは動きません)
curl -s https://shsh.host | tail -n 3 | head -n 1 | sed 's/var signed_array =//g; s|</script>||g; s|;||g' | jq -cr '."iPad6,11"' | tr -d { | tr -d } | tr "," "\n" | tr -d "\"" | awk -F: 'BEGIN {print "SHSH checker"} {print " "$1 " " $2}'
@Hayao0819
Hayao0819 / install-alterlinux.sh
Last active December 17, 2021 12:24
Alter Linux Installer for Tablet
#!/usr/bin/env bash
set -eu
nocolor=false
debug=false
install_config=()
installer_mountpoint="/var/alterinstall"
@Hayao0819
Hayao0819 / 2442.js
Created November 23, 2021 13:35
x^y=y^xの組み合わせを見つける
// RunProcess(最小指数, 最大指数, 底)
function RunProcess(startNum, processMax, ProcX){
for (let i = BigInt(startNum); i <= processMax; i++) {
let AnswerA, AnswerB
ProcX=BigInt(ProcX)
// ProcY=BigInt(processMax)-BigInt(i)
❶これから33班の発表を始めます。礼
❷さて皆さん、プログラミングってなんかよくわかんないけど、かっこよくないですか?
エリートって感じが満ち溢れてますよね。今回僕らは、プログラミングを学ぼうと奮闘しました。
❸今の世は皆さんご存知の通り、情報化社会です。小学校でプログラミング教育が始まるほどになっています。ただ、情報を扱う職業に需要があるのに、肝心の技術者が少なめなんです。収入は割とありますし、良い獲物じゃないですか。どうです皆さん、プログラミングやってみたくなりませんか?
❹ひとまずプログラミングの基礎を調べました。けど面倒くさかったです。そこで、どうせなら楽しく、あわよくば分かりやすくという野望のもと、ゲーム制作の過程でプログラミングを学ぶことにしました。しかし、今回の探究はあまり時間もなかったので、誰でも知っている簡単なゲームを再現してみました。
スマホやパソコンなど、どこでも動かせるように今回はウェブサイトでゲームを作りました。