Skip to content

Instantly share code, notes, and snippets.

@Kimundi
Kimundi / dynamic_typing.rs
Last active January 6, 2023 18:56
Dynamic typing in Rust
use std::unstable::intrinsics::{TyDesc, get_tydesc, forget};
use std::util::Void;
use std::cast::transmute;
///////////////////////////////////////////////////////////////////////////////
// TypeId
///////////////////////////////////////////////////////////////////////////////
/// `TypeId` represents a globally unique identifier for a type
pub struct TypeId {
@Manishearth
Manishearth / gc-notes.md
Last active February 20, 2024 12:55 — forked from pnkfelix/gc-notes.md
RUST + GC NOTES

Rust GC Design

Table of Contents

TODO

GC History

The role of garbage collection (GC) in Rust has been heavily revised during the language's design. It was originally deeply integrated into

@manekinekko
manekinekko / regex-es6-imports.js
Last active July 2, 2024 12:37
A regular Expression to parse ECMAScript6 import syntax
let regex = `import
(?:
["'\s]*
([\w*{}\n, ]+)
from\s*
)?
["'\s]*
([@\w/_-]+)
["'\s]*
;?
@maximousblk
maximousblk / tor.md
Created September 8, 2020 06:29
A super simple guide to starting up your own Tor hidden service

Host your own Tor hidden service!

A super simple guide to spinning up a Tor hidden service. [tl;dr]

Ubuntu 20.04 LTS was used for the making of this guide.

Install Tor

you can install Tor using the following command

sudo apt-get purge bcmwl-kernel-source
sudo apt-get install broadcom-sta-dkms
@t8
t8 / pst.uwu
Created February 4, 2021 17:01
A Profit-Sharing Token Contract built using uwu.
fn handle(state, action):
let input = action["input"]
let caller = action["caller"]
if (input["function"] == "transfer"):
let target = input.target
let quantity = input.quantity
let balances = state.balances
if (!target):
return 0