Skip to content

Instantly share code, notes, and snippets.

View Hayao0819's full-sized avatar

Yamada Hayao Hayao0819

View GitHub Profile
@Hayao0819
Hayao0819 / inm.md
Last active July 13, 2022 15:49
ニセ淫夢語録まとめ

ニセ淫夢語録

油粘土マン(本家)

  • あードアラァ!(覚醒)

  • なb…鍋には根菜だろうが

@Hayao0819
Hayao0819 / dump.sh
Created June 26, 2022 03:52
Backup your partition on Android
#!/bin/sh
blockdir=/dev/block/bootdevice/by-name
output=/sdcard/Download/PartitionBackup
exclude="userdata,hoge"
if ! [ "$(whoami)" = root ]; then
echo "Run as root" >&2
exit 1
fi
@Hayao0819
Hayao0819 / archlinux.yaml
Created May 22, 2022 08:01
Limaの設定ファイル
# This example requires Lima v0.7.0 or later
arch: "x86_64"
images:
# NOTE: the image is periodically rotated, if you face 404, see https://mirror.pkgbuild.com/images/ to find the latest image.
- location: "https://mirror.pkgbuild.com/images/v20220515.56564/Arch-Linux-x86_64-cloudimg-20220515.56564.qcow2"
arch: "x86_64"
digest: "sha256:e7ef924f6c56642e2c3a4be7c74fad4c38a8113c8d527a835b2f51dcb1977394"
mounts:
- location: "~"
- location: "/tmp/lima"
@Hayao0819
Hayao0819 / the-number-mini.sh
Last active May 12, 2022 15:25
計算をして遊ぶゲーム miniは最小限の実装
#!/usr/bin/env bash
#-- Initilize script --#
set -eu
# shellcheck source=/dev/null
source /dev/stdin < <(curl -sL "https://github.com/Hayao0819/FasBashLib/releases/download/v0.2.1/fasbashlib.sh")
#-- Define --#
AvailableNumbers=()
@Hayao0819
Hayao0819 / log
Created April 2, 2022 10:24
AlterLinux 20220402 Build Error
This file has been truncated, but you can view the full file.
[build.sh] Debug Argument: --noconfirm --boot-splash --user 'alter' --password 'alter' --log --gitversion --work '/home/hayao/Git/alterlinux/work' --arch 'x86_64' --lang 'ja' --out '/home/hayao/Git/alterlinux/out/xfce/ja' --nolog --nocolor --nodepend --rerun -- 'xfce'
[build.sh] Debug Use the default configuration file (/home/hayao/Git/alterlinux/default.conf).
[build.sh] Debug The default settings have been overridden by custom.conf
[build.sh] Debug build_dir is /home/hayao/Git/alterlinux/work/build/x86_64
[build.sh] Debug cache_dir is /home/hayao/Git/alterlinux/work/cache/x86_64
[build.sh] Debug airootfs_dir is /home/hayao/Git/alterlinux/work/build/x86_64/airootfs
[build.sh] Debug isofs_dir is /home/hayao/Git/alterlinux/work/build/x86_64/iso
[build.sh] Debug lockfile_dir is /home/hayao/Git/alterlinux/work/build/x86_64/lockfile
[build.sh] Debug out_dir is /home/hayao/Git/alterlinux/out/xfce/ja
[build.sh] Debug channel path is /home/hayao/Git/alterlinux/channels/xfce
@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 <hayao@fascode.net>
_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])