Skip to content

Instantly share code, notes, and snippets.

@L0ry-git
L0ry-git / main.rs
Created August 9, 2021 12:19
Consistent implementation of Koya's lovecalc command using hashes.
use std::{
collections::hash_map::DefaultHasher,
hash::{Hash, Hasher},
};
fn main() {
let data = ["Billy", "Tom"];
let strings: Vec<String> = data.iter()
.map(|str| String::from(*str))
.collect();
@L0ry-git
L0ry-git / HiraganaHelper.java
Last active June 20, 2021 23:24
Some util Lists to use as reference for the Hiragana syllabary and its parts/variations
package util;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
public class HiraganaHelper {
@L0ry-git
L0ry-git / CollatzSheet.java
Created April 19, 2021 03:32
Simple Collatz conjecture visualizer I made while I was bored.
import java.awt.Canvas;
import java.awt.Color;
import java.awt.Graphics;
public class CollatzSheet extends Canvas {
private static final long serialVersionUID = -7304438045996947968L;
//current number whose sequence is being drawn
private long num;
@L0ry-git
L0ry-git / main.rs
Last active April 26, 2021 19:52
Joke tool that allows you to write and compile Rust code as folder names. The syntax for every folder name is <line number> <code> (for example "11 let a = 1;"). See lines 46-55 for the other syntax rules. Crate name is supposed to be "folderustc". Usage: folderustc <source folder> <rust compiler args>.
use std::{
fs::{self, DirEntry, File},
io::{prelude::*, Error, Result},
process::Command
};
//Default temp file name
const FILE_NAME: &'static str = "source.rs";
fn main() -> Result<()> {