Skip to content

Instantly share code, notes, and snippets.

View lynzrand's full-sized avatar

Rynco Maekawa lynzrand

View GitHub Profile
@lynzrand
lynzrand / encode.py
Last active October 30, 2022 16:31
用最短的代码画一只刘看山!当然弄巧成拙太长了
from typing import Any
import bitstream
liukanshan = open("liukanshan.txt", "r").read()
lks_lines = liukanshan.splitlines()
rle = []
# do run-length encoding of the lines
for line in lks_lines:
rle_line = []
@lynzrand
lynzrand / private-build-plans.toml
Last active June 7, 2025 00:50 — forked from re-xyr/private-build-plans.toml
Iosevka Moe/Akira - Rynco's edition - Cute variants of the Iosevka font
[buildPlans.IosevkaMoe]
family = "Iosevka Moe"
spacing = "normal"
serifs = "sans"
noCvSs = true
exportGlyphNames = false
[buildPlans.IosevkaMoe.variants.design]
capital-b = "more-asymmetric-interrupted-serifless"
capital-c = "serifless"
// ==UserScript==
// @name 学堂云/雨课堂(是雨课堂4.0,非雨课堂,题库自动搜集)
// @namespace [email protected]
// @version 1.2
// @description 雨课堂脚本
// @author sea of flowers
// @match *://*.yuketang.cn/*
// @match *://*.edu.cn/*
// @connect huan.fm210.cn
// @grant unsafeWindow
(* Calculate good rational representation of [value] within relative \
error [epsilon], with denominator not bigger than [limit].
Returns List[(approximation, relativeError, absoluteError)]
*)
RationalReprInside := Function[{limit, epsilon, value}, Module[
{reprs, real, approx, delta},
reprs = {};
(* For each denominator,
find the appropriate approximation if possible *)
@lynzrand
lynzrand / sstu-waterfall.cfg
Created May 20, 2021 16:22
Implement waterfall effects on SSTU engines
// Remove stock effects
@PART[SSTU-SC-ENG-*]:AFTER[SSTU]
{
@EFFECTS
{
@running_closed
{
!MODEL_MULTI_PARTICLE,*{}
}
@running_main
@lynzrand
lynzrand / readme.md
Last active December 8, 2020 17:44
Github Contribution Renderer

Dependencies

drawsvg
colormath

Usage

  1. Download
from typing import List, Tuple
from PIL import Image, ImageDraw, ImageColor
import math
import random
from PIL.Image import new
from PIL.ImageDraw import Draw
def gen_saturated_color() -> Tuple[int, int, int]:
@lynzrand
lynzrand / Plugin.cs
Created October 16, 2020 17:28
FixKPlug
using BepInEx;
using HarmonyLib;
using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;
using System.Collections.Generic;
namespace Karenia.FixKPlug
{
[BepInPlugin(id, projectName, version)]
@lynzrand
lynzrand / Dockerfile
Created September 20, 2020 07:41
Bollard build image result issue
# Shared Volume
FROM busybox:buildroot-2014.02
VOLUME /data
CMD ["/bin/sh"]
@lynzrand
lynzrand / program.cs
Created August 26, 2020 02:28
Splitting stream & reading stuff inside
using System;
using System.Threading;
using System.IO;
using System.Threading.Tasks;
using System.Text.Unicode;
using System.Text;
using SharpCompress.Readers;
using MicroKnights.IO.Streams;
class Program