Skip to content

Instantly share code, notes, and snippets.

@max-itzpapalotl
max-itzpapalotl / overview.md
Last active March 17, 2024 22:03
"Rust = Future<C++>" overview

Rust = Future<C++>

In this channel I introduce Rust for people who know C++ already. The videos are supposed to be short and cover only a single topic. Each video comes with a github gist, which contains all the code and commands for copy/paste, such that you can easily try out things. Furthermore, there are links to the excellent Rust documentation.

This is still work in progress. As you can see in the table below,

@eatonphil
eatonphil / bst.rs
Created November 27, 2023 17:27
Binary Search Tree in Rust
struct BST<K: Ord + Clone, V: Ord + Clone> {
key: Option<K>,
value: Option<V>,
left: Option<Box<BST<K, V>>>,
right: Option<Box<BST<K, V>>>,
}
impl<K: Ord + Clone, V: Ord + Clone> BST<K, V> {
fn init() -> Box<BST<K, V>> {
return Box::new(BST::<K, V> {
@parttimenerd
parttimenerd / sample.py
Last active December 1, 2023 12:33
Collect all used classes, methods and functions
"""
Sample file to test the trace module.
This should print:
...
********** Trace Results **********
Used classes:
only static init:
not only static init:
@LiquidityC
LiquidityC / Makefile
Last active December 1, 2023 03:24
Generic drop in Makefile
VERSION = \"1.0.0\"
PREFIX ?= out
INCDIR = inc
SRCDIR = src
LANG = c
OBJDIR = .obj
MODULE = binary_name
CC = gcc
@dangovorenefekt
dangovorenefekt / blockmetatwitter.md
Last active July 5, 2024 08:04
Block Meta and Twitter (nginx)
@hyperupcall
hyperupcall / settings.jsonc
Last active July 21, 2024 10:53
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@FeepingCreature
FeepingCreature / youre_doing_json_apis_wrong.md
Last active January 7, 2024 19:33
You Are Doing JSON APIs Wrong

You are doing JSON APIs wrong.

When you use JSON to call an API - not a REST API, but something like JSON-RPC - you will usually want to encode one of several possible messages.

Your request body looks like this:

{
 "type": "MessageWithA",
@Bill-tran
Bill-tran / how-to-install-openssl-1.1.1-on-centos-7.md
Created September 7, 2021 09:22
How to install openssl 1.1.1 on CentOS 7

How To Install OpenSSL 1.1.1 on CentOS 7

This tutorial goes through how to install openssl 1.1.1 on CentOS 7, since the yum repo only installs up to openssl 1.0.

Requirements

Upgrade the system

yum -y update