Skip to content

Instantly share code, notes, and snippets.

View MetroWind's full-sized avatar
🐱
Setting status…

Metro Wind MetroWind

🐱
Setting status…
View GitHub Profile
@MetroWind
MetroWind / private-build-plans.toml
Created December 12, 2023 03:42
Custom Iosevka config
[buildPlans.iosevka-custom]
family = "Iosevka Custom"
spacing = "normal"
serifs = "sans"
no-cv-ss = true
export-glyph-names = false
[buildPlans.iosevka-custom.variants.design]
capital-d = "more-rounded-serifless"
capital-g = "toothless-corner-serifless-hooked"
@MetroWind
MetroWind / winconf.el
Created December 10, 2023 02:12
Apply a window configuration declaritively.
(defun -apply-window-configuration (conf window)
(defun -split-to-windows (conf window)
(if (null conf)
nil
(let* ((this-split (car conf))
(new-window
(cond ((eq (car this-split) 'column)
(split-window-right nil window))
((eq (car this-split) 'row)
(split-window-below nil window))
@MetroWind
MetroWind / cars.html
Created June 16, 2023 00:27
家用车分类一览
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title>My test page</title>
<script>
function draw()
{
const canvas = document.getElementById("tutorial");
@MetroWind
MetroWind / house.svg
Created May 18, 2023 04:05
作风优良能打胜仗
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MetroWind
MetroWind / circle.rs
Created January 8, 2020 03:23
Draw a circle with Rust
extern crate sdl2;
use std::path::Path;
use std::time::Duration;
use sdl2::render::Canvas;
use sdl2::video::Window;
use sdl2::event::Event;
use sdl2::keyboard::Keycode;
use sdl2::rect::{Point, Rect};
@MetroWind
MetroWind / Config.ini
Created June 28, 2022 03:53
Elden Ring PS 5 rune farm
# DS4Emulator by r57zone
# ReadMe: https://github.com/r57zone/DualShock4-emulator
# Key codes: https://github.com/r57zone/Half-Life-Alyx-novr/blob/master/BINDINGS.md
# Support the project: https://r57zone.github.io/support.html
[Main]
ExitBtn=112
InvertX=0
InvertY=0
@MetroWind
MetroWind / tests.txt
Created June 10, 2022 22:03
Email validation test
first.last@iana.org
Valid
1234567890123456789012345678901234567890123456789012345678901234@iana.org
Valid
first.last@sub.do,com
Invalid
"first\"last"@iana.org
Valid
first\@last@iana.org
Invalid
@MetroWind
MetroWind / doraemon.svg
Last active May 18, 2022 04:49
机器猫……
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MetroWind
MetroWind / make-shot.sh
Created May 5, 2022 17:54
Combine two screenshots
#!/usr/bin/env zsh
convert -size 1292x928 xc:black -fill white -draw "path 'M 200,0 C 200,800 1500,720 1500,1100 V 2000 H 2000 V -20 H 200 L 200,0'" mask.png
composite dark.png light.png mask.png test.png
convert test.png \( light.png -channel a -separate +channel \) -alpha off -compose CopyOpacity -composite shot.png
rm test.png mask.png
@MetroWind
MetroWind / MakeCurve.py
Created December 4, 2015 05:15
Create a curve in Blender.
import bpy
import math
import numpy
from mathutils import Vector
w = 1 # weight
Scale = 0.03
def readCoords(filename):
with open(filename, 'r') as File: