Skip to content

Instantly share code, notes, and snippets.

View willemneal's full-sized avatar
🎯
Focusing

Willem Wyndham willemneal

🎯
Focusing
View GitHub Profile
@willemneal
willemneal / token.md
Last active April 26, 2023 19:25
Token generated by GPT

Here is the complete implementation of Interface for Token:

impl Interface for Token {
    fn allowance(&self, from: Address, spender: Address) -> i128 {
        self.allowances.get(&(from, spender)).unwrap_or(0)
    }

    fn increase_allowance(&mut self, from: Address, spender: Address, amount: i128) {
        from.require_auth();
type exists<V> = <Y>(p: (v: V) => Y) => Y;
// module interface
type Unique_S<T> = {
next: () => T,
equal: (a: T, b: T) => boolean,
compare: (a: T, b: T) => number,
show: (t: T) => string,
};
@fire1ce
fire1ce / oh-my-zsh on openwrt or lede-project.md
Last active July 14, 2024 17:47
Install oh-my-zsh on openwrt/lede-project

Install oh-my-zsh on OpenWrt

Install Requirements Packages

opkg update && opkg install ca-certificates zsh curl git-http

Install oh-my-zsh

use "collections"
use "time"
primitive Factorial
""" Factorial
"""
fun fac(n:U64): U64 =>
var f : U64 = 1
var i : U64 = 1
if n == 0 then