Skip to content

Instantly share code, notes, and snippets.

@xiupos
xiupos / manjaro.md
Last active October 15, 2024 12:14

sudo without password

sudo bash -c "echo '%wheel ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers"

logout & login

yay

Keybase proof

I hereby claim:

  • I am xiupos on github.
  • I am xiupos (https://keybase.io/xiupos) on keybase.
  • I have a public key ASB-fY0z2cNx9LuSB2tB6gIM1b0NB-CMKbaxO1qzwHXyBgo

To claim this, I am signing this object:

@xiupos
xiupos / en.md
Last active September 30, 2023 01:44
Monoarkhism

EN / JA

Monoarkhism

Experimental faith for the modern age

Bible

In the beginning they created the principle. Now the world was derived from it.

@xiupos
xiupos / 0gentoo.md
Last active October 11, 2024 08:56
Gentoo Linux インストールメモ

Keybase proof

I hereby claim:

  • I am ha2zakura on github.
  • I am ha2zakura (https://keybase.io/ha2zakura) on keybase.
  • I have a public key ASBXf14_VgJlobfkmwHznpVO3hqwpDWbRjPrySpIy9ti4Qo

To claim this, I am signing this object:

@xiupos
xiupos / example.nim
Created April 29, 2020 06:54
Feedforward neural network on Nim
import math, random, sugar
type
Matrix[T; M, N: static[int]] = array[1..M, array[1..N, T]]
# 加法
proc `+`[T, I, J](a: Matrix[T, I, J], b: T): Matrix[T, I, J] =
var c: Matrix[T, I, J]
for i in 1..I:
for j in 1..J:
@xiupos
xiupos / code.ts
Created July 15, 2019 07:32
ユニット会計用
const ADMIN_USER_ID = {製作者のLINE ID};
const CHROSTE_GROUP_ID = {ユニットのLINEグループID};
const CHANNEL_ACCESS_TOKEN = {LINE Messaging APIのアクセストークン};
// 毎週日曜日のトリガー
function weekly() {
post_differs(CHROSTE_GROUP_ID);
}
// 毎夜のトリガー
@xiupos
xiupos / main.c
Created February 9, 2019 10:28
EEPROM読み出し機 by PIC18F14K50
// I2Cのテスト(AQM0802A)
// ha2zakura
#include <xc.h> // PIC のハードウエア定義
#define _XTAL_FREQ 48000000
#define true 1
#define false 0
#define int8_t signed char
@xiupos
xiupos / mtys.ino
Created December 30, 2018 23:07
MIDI to YMZ294(SPI)
#include <SPI.h>
#include <MIDI.h> // http://playground.arduino.cc/Main/MIDILibrary
#define SS 10
#define A0 9
int tone1Interval = 0;
int tone2Interval = 0;
int tone3Interval = 0;
@xiupos
xiupos / main.asm
Created November 4, 2018 00:08
YMZ294のSPI化
LIST P=12f683
#INCLUDE <p12f683.inc>
__CONFIG _CP_OFF & _CPD_OFF & _WDT_OFF & _BOD_ON & _IESO_OFF& _PWRTE_ON & _INTOSCIO & _MCLRE_OFF
w_temp EQU 0x20 ; Wレジスタ保存用
status_temp EQU 0x21 ; STATUSレジスタ保存用
stand EQU 0x22 ; 立ち上がりフラグ
;**********************************************************************