Skip to content

Instantly share code, notes, and snippets.

module main
import gg
import gx
import os
enum KomaType {
fu_a
fu_b
kei
@syobocat
syobocat / blocklist.tsv
Last active November 4, 2024 10:26
post.syobon.netブロックリスト
Domain Reason
@syobocat
syobocat / mkpkg.sh
Created January 10, 2024 11:22
Wrapper for Poudriere
#!/bin/sh
killed() {
echo -e '\033[32m* Aborted.\033[m'
exit
}
trap killed sigint
JAIL="140amd64" # Jail name
TARGETS="laptop desktop" # List of setname
@syobocat
syobocat / openpgp.md
Created December 23, 2023 06:24
openpgp.md

$2a$11$GBfNqjgehbvMU.VHysXTfeNT5JZ.RdRgtRrzXZxFsJGslMEKxHf1i

#!/usr/bin/env bash
# UmiCursor/ReiCursor Converter for X11/Wayland
# Usage:
# 1. Download UmiCursor/ReiCursor
# https://booth.pm/ja/items/4568548
# https://booth.pm/ja/items/6090702
# 2. Install win2xcur
# https://github.com/quantum5/win2xcur
@syobocat
syobocat / main.rs
Created April 14, 2023 02:57
n以下のあらゆる自然数で割り切れる数だすやつ
// Written on: 2022/08/14
use num_bigint::BigUint;
fn main() {
let n = "100";
let m: BigUint = n.parse().unwrap();
let mut number = BigUint::from(0_u8);
@syobocat
syobocat / main.rs
Created April 14, 2023 02:47
連射機
// Written on: 2021/08/19
use enigo::*;
use std::{io, thread, time};
fn main() {
let mut interval = 0;
let mut is_ok = false;
while !is_ok {
@syobocat
syobocat / main.rs
Created April 14, 2023 02:45
コラッツ予想計算するやつ
// Written on: 2021/10/18
fn main() {
for i in 1..10000 {
println!("{} : {}", i, collatz(i));
}
}
fn collatz(mut num: i32) -> String {
let mut out = num.to_string();
@syobocat
syobocat / main.rs
Created April 14, 2023 02:44
因数分解するやつ
// Written on: 2021/10/31
fn factor(a: i32, b: i32, c: i32) -> String {
let mut a_pattern = Vec::new();
let mut c_pattern = Vec::new();
a_pattern.push(vec![1, a]);
c_pattern.push(vec![1, c]);
for i in 2..a {
@syobocat
syobocat / main.rs
Created April 14, 2023 02:40
素因数分解機
// Written on: 2022/02/20
use std::io;
use num_bigint::BigUint;
fn main() {
println!("Type a number:");
let number = read();
let factors = factorize(number.clone());