Skip to content

Instantly share code, notes, and snippets.

View mvolfik's full-sized avatar
🐧
*penguin noises*

Matěj Volf mvolfik

🐧
*penguin noises*
View GitHub Profile
const { Actor } = require("apify");
const { Readable } = require("node:stream");
const https = require("node:https");
class MyStream extends Readable {
constructor() {
super();
this.i = 0;
}
@mvolfik
mvolfik / svelte_store.rs
Created March 12, 2022 23:19
Svelte store contract implemented in Rust using wasm-bindgen. No reason to use to use this on its own, but if you have a larger wasm project, this is handy to use to automatically propagate state changes to the presentation layer
use std::{cell::RefCell, collections::HashMap, rc::Rc};
use js_sys::{Array, Function};
use wasm_bindgen::{
prelude::{wasm_bindgen, Closure},
JsCast, JsValue,
};
#[wasm_bindgen]
pub struct Writable {
@mvolfik
mvolfik / liveworksheets.user.js
Last active October 11, 2023 14:13
Userscript to solve liveworksheets.com exercises
// ==UserScript==
// @name Liveworksheets.com solver
// @namespace https://mvolfik.github.io/
// @version 0.2
// @description Add button to autofill liveworksheets.com
// @author Matěj Volf
// @match https://www.liveworksheets.com/*
// @downloadUrl https://gist.github.com/mvolfik/5d663fd304c38a872813e0576a58573a/raw/liveworksheets.user.js
// @updateUrl https://gist.github.com/mvolfik/5d663fd304c38a872813e0576a58573a/raw/liveworksheets.user.js
// @grant none
@mvolfik
mvolfik / learningapps.user.js
Created March 18, 2021 19:31
Userscript to solve learingapps.org exercises
// ==UserScript==
// @name Learningapps.org solver
// @namespace https://mvolfik.github.io/
// @version 0.1
// @description Add button to autofill learningapps.org
// @author Matěj Volf
// @match https://learningapps.org/tools/*/watch?id=*
// @downloadUrl https://gist.github.com/mvolfik/af53d9f52825bf1c4911d8536980fb43/raw/liveworksheets.user.js
// @updateUrl https://gist.github.com/mvolfik/af53d9f52825bf1c4911d8536980fb43/raw/liveworksheets.user.js
// @grant none