Skip to content

Instantly share code, notes, and snippets.

View yantene's full-sized avatar
:fishsticks:
I'm new to being human.

Shuhei YOSHIDA yantene

:fishsticks:
I'm new to being human.
View GitHub Profile
newtrack(piano) {
ch = 1
l = 480
du = 9
v = 60
}
newtrack(percussion) {
ch = 10
l = 480
du = 9
# Maintainer: yantene <contact at yantene.net>
pkgname=takt
pkgver=0.310
pkgrel=1
pkgdesc="A text-based music programming language designed by Satoshi Nishimura"
arch=('x86_64')
url="http://takt.sourceforge.net/"
license=('GPL' 'LGPL')
depends=('readline' 'alsa-lib')

Kagoya で適当にサーバ立てる

ISO イメージアップロード

Ubuntu Server 18.04.2 LTS をベースに考える。

https://ubuntu.com/download/server

以下で ISO イメージアップロード

@yantene
yantene / 60-keyboard.hwdb
Last active October 22, 2023 02:25
/etc/udev/hwdb.d/60-keyboard.hwdb
# Check keycode by `sudo showkey --scancodes` and `sudo evtest /dev/input/event3`
# Execute `sudo udevadm hwdb --update` and reboot
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadX280* # ThinkPad X280
KEYBOARD_KEY_3a=leftctrl # Caps Lock -> Left Ctrl
KEYBOARD_KEY_1d=leftmeta # Left Ctrl -> Left Super
KEYBOARD_KEY_38=muhenkan # Left Alt -> Muhenkan
KEYBOARD_KEY_b8=henkan # Right Alt -> Henkanmode
KEYBOARD_KEY_9d=rightalt # Right Ctrl -> Right Alt
@yantene
yantene / ju_solver.rb
Last active February 17, 2019 13:34
10つくったー (https://shindanmaker.com/217387) ソルバ
#!/usr/bin/env ruby
# ./ju_solver.rb 13 9 -3 73
ARGV.map(&:to_i).then { |ord|
%i[+ - * /].repeated_combination(ord.size - 1).flat_map { |orr|
(ord + orr).permutation((ord + orr).size).map { |formula|
begin
formula if formula.each.with_object([]) { |v, obj|
if v.is_a? Symbol
fail if obj.size < 2 || v == :/ && obj[-1].zero?
#!/usr/bin/env ruby
braille = <<~EOS
⠀⠁⠂⠃⠄⠅⠆⠇⡀⡁⡂⡃⡄⡅⡆⡇⠈⠉⠊⠋⠌⠍⠎⠏⡈⡉⡊⡋⡌⡍⡎⡏
⠐⠑⠒⠓⠔⠕⠖⠗⡐⡑⡒⡓⡔⡕⡖⡗⠘⠙⠚⠛⠜⠝⠞⠟⡘⡙⡚⡛⡜⡝⡞⡟
⠠⠡⠢⠣⠤⠥⠦⠧⡠⡡⡢⡣⡤⡥⡦⡧⠨⠩⠪⠫⠬⠭⠮⠯⡨⡩⡪⡫⡬⡭⡮⡯
⠰⠱⠲⠳⠴⠵⠶⠷⡰⡱⡲⡳⡴⡵⡶⡷⠸⠹⠺⠻⠼⠽⠾⠿⡸⡹⡺⡻⡼⡽⡾⡿
⢀⢁⢂⢃⢄⢅⢆⢇⣀⣁⣂⣃⣄⣅⣆⣇⢈⢉⢊⢋⢌⢍⢎⢏⣈⣉⣊⣋⣌⣍⣎⣏
⢐⢑⢒⢓⢔⢕⢖⢗⣐⣑⣒⣓⣔⣕⣖⣗⢘⢙⢚⢛⢜⢝⢞⢟⣘⣙⣚⣛⣜⣝⣞⣟
⢠⢡⢢⢣⢤⢥⢦⢧⣠⣡⣢⣣⣤⣥⣦⣧⢨⢩⢪⢫⢬⢭⢮⢯⣨⣩⣪⣫⣬⣭⣮⣯
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
map (\(n, fb) -> last (sort [(show n), fb])) (zip [1..] (map (\(x, y) -> x ++ y) (zip (cycle ["", "", "fizz"]) (cycle ["", "", "", "", "buzz"]))))
-- import Data.List
p ['', '', 'fizz'].cycle.lazy.zip(([''] * 4 + ['buzz']).cycle).map(&:join).with_index(1).map { |*k| (k - [''])[0] }.take(20).to_a
- ー
, 、
. 。
[ 「
] 」
~ 〜
a あ
ba ば
bb っ b
be べ