Skip to content

Instantly share code, notes, and snippets.

View Ryoga-exe's full-sized avatar
💭

Ryoga Ryoga-exe

💭
View GitHub Profile
@Ryoga-exe
Ryoga-exe / susuru.sh
Created July 23, 2024 16:22
コラ~~~!
#!/bin/sh
printf "
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⣿⠿⢿⣿⣿⣿⣿⣿⣿⣿[38
@Ryoga-exe
Ryoga-exe / scanner.zig
Created February 25, 2024 19:50
Simple text scanner like Java for Zig. For competitive programming.
const std = @import("std");
pub const Scanner = struct {
const Self = @This();
const stdin = std.io.getStdIn();
var buffered_reader = std.io.bufferedReader(stdin.reader());
var reader = buffered_reader.reader();
buffer: [65536]u8 = undefined,
@Ryoga-exe
Ryoga-exe / DisjointSet.zig
Last active February 19, 2024 19:23
Zig implementation of disjoint set (union and find algorithm) and its tests.
const std = @import("std");
const Allocator = std.mem.Allocator;
const DisjointSet = struct {
const Self = @This();
roots: []usize,
sizes: []usize,
groups: usize,
allocator: Allocator,
@Ryoga-exe
Ryoga-exe / setup-siv3d-resources.ps1
Last active December 19, 2023 18:55
Siv3D で example, engine, dll を .gitignore に含めたとき用にセットアップする PowerShell スクリプト
$SIV3D_VERSION = "0.6.13"
$resources = (Get-ChildItem -Recurse Resource.rc)
foreach ($resource in $resources) {
$directory = $resource.DirectoryName
Write-Host "Resource.rc Found! (${resource})" -ForegroundColor Green
$content = (Get-Content $resource.FullName -Raw) -replace "/\*[\s\S]*?\*/|//.*", ""
$m = [regex]::Matches($content, "(?<=(^|\s)Resource\()[^\(\)]+(?=\))", "Multiline")
#include <Wire.h>
#include "Adafruit_MPR121.h"
Adafruit_MPR121 cap = Adafruit_MPR121();
uint16_t currtouched = 0;
uint16_t state[12] = {};
uint16_t rstate[12] = {};
bool tstate[12] = {};
const char Data[3] = { 1, 0, -1 };
@Ryoga-exe
Ryoga-exe / Yobikomi-kun.ino
Created December 8, 2023 13:04
Play Yobikomi-kun with Arduino
byte step=2; //ピン番号は適当に実配線と合わせる
byte dir=5; //ピン番号は適当に実配線と合わせる
#define D 587
#define E 659
#define F 739
#define G 783
#define A 880
#define B 987
#define a 225
#define b 450
@Ryoga-exe
Ryoga-exe / Makefile
Created November 27, 2023 11:21
make 名句
.SILENT:
.PHONY: 名句
名句:
echo "古池や\n蛙飛びこむ\n水の音"
# pragma once
# include <Siv3D.hpp>
namespace Tween
{
struct transition_t
{
double to;
Duration begin, end;
std::function<double(double)> easingFunction = EaseInLinear;
{
"$schema" : "https://aka.ms/winget-packages.schema.2.0.json",
"CreationDate" : "2022-12-29T20:25:53+09:00",
"Sources" :
[
{
"Packages" :
[
{
"PackageIdentifier" : "7zip.7zip"
@Ryoga-exe
Ryoga-exe / RangeSet.cpp
Last active October 23, 2022 18:27
WIP
# include <cstdint>
# include <iostream>
# include <vector>
# include <cassert>
# include <set>
namespace Ryoga_exe
{
using int32 = std::int32_t;
using int64 = std::int64_t;