Skip to content

Instantly share code, notes, and snippets.

Avatar
🧻
AOT Compiling JavaScript

Rynco Maekawa lynzrand

🧻
AOT Compiling JavaScript
View GitHub Profile
View IITC plugin: S2 cell.user.js
// ==UserScript==
// @id iitc-plugin-s2cells@ny
// @name IITC plugin: S2 cell (VIP道館-藍,道館-紅,補給站-黃)
// @author ny
// @category Layer
// @version 0.1.7
// @namespace https://github.com/alvin853/s2cells
// @updateURL https://raw.githubusercontent.com/alvin853/s2cells/master/s2cells.meta.js
// @downloadURL https://raw.githubusercontent.com/alvin853/s2cells/master/s2cells.user.js
// @description IITC: Shows various S2 cells on the map
@lynzrand
lynzrand / encode.py
Last active Oct 30, 2022
用最短的代码画一只刘看山!当然弄巧成拙太长了
View encode.py
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 = []
View private-build-plans.toml
[buildPlans.iosevka-ash]
family = "Iosevka Ash"
desc = "A modified version of Iosevka Sparkle"
spacing = "quasi-proportional"
no-cv-ss = true
no-ligation = true
snapshotFamily = 'iosevka-ash'
[buildPlans.iosevka-ash.variants.design]
capital-g = "toothless-rounded-serifless-hooked"
View 雨课堂脚本.js
// ==UserScript==
// @name 学堂云/雨课堂(是雨课堂4.0,非雨课堂,题库自动搜集)
// @namespace dandanmuaa@gmail.com
// @version 1.2
// @description 雨课堂脚本
// @author sea of flowers
// @match *://*.yuketang.cn/*
// @match *://*.edu.cn/*
// @connect huan.fm210.cn
// @grant unsafeWindow
View ConsonanceScoring.nb
(* 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
Implement waterfall effects on SSTU engines
View sstu-waterfall.cfg
// Remove stock effects
@PART[SSTU-SC-ENG-*]:AFTER[SSTU]
{
@EFFECTS
{
@running_closed
{
!MODEL_MULTI_PARTICLE,*{}
}
@running_main
@lynzrand
lynzrand / readme.md
Last active Dec 8, 2020
Github Contribution Renderer
View readme.md

Dependencies

drawsvg
colormath

Usage

  1. Download
View glitch.py
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]:
View Plugin.cs
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 Sep 20, 2020
Bollard build image result issue
View Dockerfile
# Shared Volume
FROM busybox:buildroot-2014.02
VOLUME /data
CMD ["/bin/sh"]