Skip to content

Instantly share code, notes, and snippets.

@serid
serid / index.html
Created April 17, 2025 10:35
A JavaScript to benchmark WASM module linking performance
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body style="background-color:black">
<script src="wasm-link-benchmark.js"></script>
import { toString, map, filter } from './util.js'
async function main() {
let txt = await (await fetch('1.txt')).text()
let sanaset = txt.matchAll(/\w*/g)
sanaset = map(sanaset, x=>x[0])
sanaset = filter(sanaset, x=>x!=='')
sanaset = map(sanaset, x=>x.toLowerCase())
sanaset = Object.fromEntries(sanaset.map(k => [k,'']));
//document.getElementById('out').innerText = toString(sanaset)
class Lazy<T> {
f: () => T
value: T | null
constructor(f: () => T) {
this.f = f
this.value = null
}
get(): T {
struct Size {
x: i32,
y: i32,
}
impl Size {
fn new(x: i32, y: i32) -> Self {
Size { x, y }
}
}
import java.io.*;
import java.util.*;
class Programm {
public static void main(String[] args) {
get_netsh_profiles();
}
public static void get_wifi_pass(String net_name) {
ProcessBuilder processBuilder = new ProcessBuilder();
### This program shuffles pixels in input.jpg and spits them out to output.jpg
###
### Pretty easy huh?
from PIL import Image
from random import shuffle
def main():
im = Image.open("input.jpg")
x, y = im.size