Skip to content

Instantly share code, notes, and snippets.

View elderica's full-sized avatar
🚞
I'm enjoing with trains and computers.

elderica

🚞
I'm enjoing with trains and computers.
View GitHub Profile
import math
import numpy
import pedalboard.io
wav_hz = 44100
musictime = wav_hz * 5
root = 1/(2**(1/2))
frq1 = 1./440.
frq2 = 440. * root * root
import math
import numpy
import pedalboard.io
wav_hz = 44100
musictime = wav_hz * 5
root = 1/(2**(1/2))
frq1 = 1./440.
frq2 = 440. * root * root
import math
import numpy
import pedalboard.io
wav_hz = 44100
musictime = wav_hz * 5
frq = 440.0
def main():
rawframes = []
import math
import array
import io
import os
import os.path as path
import wave
import winsound
wav_hz = 44100
musictime = wav_hz * 5
# See: https://github.com/openwrt/openwrt/issues/9619#issuecomment-1722333145
from tkinter import *
from tkinter import filedialog
from tkinter import messagebox
import gzip
import os
import os.path
def find_gzip_size(gz_filepath):
st = os.stat(gz_filepath)
@elderica
elderica / WindowsPathChecker.ps1
Last active September 3, 2025 11:29 — forked from yamamaya/WindowsPathChecker.cs
WindowsPathChecker - A simple console application to check the validity of paths
# ***********************************************************************
# WindowsPathChecker
# A simple console application to check
# the validity of paths in the Windows PATH environment variable.
# ***********************************************************************
using namespace System
using namespace System.IO
using namespace System.Collections.Generic
# システムにインストールされているパッケージをすべて更新して再起動する。
apt update && apt upgrade
reboot
# 再びrootとしてログインし、GNU ScreenとFreecivサーバをインストールする。
apt install screen freeciv-server
# Freecivサーバを動かすユーザfreecivを作り、パスワードを設定する。
useradd -m -s /bin/bash freeciv
passwd freeciv
-bad
-bap
-nbbb
-nbc
-br
-nbs
-c41
-cd41
-cdb
-ce
#!/bin/bash
### Usage:
### $ env RESOLUTION=UHD NDAYSAGO=1 COUNT=10 MARKET=ja-JP SAVETO=$HOME/Bing sh download_bing_wallpaper.sh
set -euo pipefail
RESOLUTION=${RESOLUTION:-1920x1080} # Possible values: 1920x1080, 1366x768, UHD
NDAYSAGO=${NDAYSAGO:-0}
#!/bin/bash
set -eu
API_URL='http://www.bing.com/HPImageArchive.aspx'
OUTPUT_FILE="$HOME/bing-photo-of-the-day.jpg"
URL=$(curl -sSLG -d 'format=js' -d "mkt=ja-JP" -d "idx=0" -d "n=1" "${API_URL}" | jq -r '.images[].url')
FULL_URL=$(printf 'https://www.bing.com%s' "${URL}")
curl -sSLo "${OUTPUT_FILE}" "${FULL_URL}"