Skip to content

Instantly share code, notes, and snippets.

use std::collections::HashMap;
use std::fmt;
use std::io;
use std::num::ParseFloatError;
/*
Types
*/
#[derive(Clone)]
@melioratus
melioratus / org-mode-syntax-superscripts-and-subscripts-example-1.org
Last active July 20, 2023 15:33
org-mode syntax - superscripts and subscripts example 1

org-mode syntax - superscripts and subscripts example 1

  • Add #+OPTIONS: ^:{} to your org-mode file to explicitly enable superscripts and subscripts.
superscripts
To create a superscript put ^{ characters at the start of the superscript text and } at the end of the superscript text, e.g. word^{superscript} will render as wordsuperscript.
subscripts
To create a subscript put _{ characters at the start of the subscript text and } at the end of the subscript text, e.g. word_{subscript} will render as wordsubscript.

References

@thefranke
thefranke / RSS.md
Last active May 3, 2025 09:16
A list of RSS endpoints, readers and resources

The RSS Endpoint List

Please refer to this blogpost to get an overview.

Replace *-INSTANCE with one of the public instances listed in the scrapers section. Replace CAPITALIZED words with their corresponding identifiers on the website.

Social Media

Twitter

@Rich-Harris
Rich-Harris / what-is-svelte.md
Last active March 20, 2025 20:49
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

@sguzman
sguzman / Dockerfile
Created November 4, 2018 20:33
Dockerfile for rustup with building deps first
FROM liuchong/rustup:musl AS base
RUN mkdir app
WORKDIR ./app
COPY ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml
RUN rustup target add x86_64-unknown-linux-musl
RUN rustup install nightly
RUN cargo install cargo-build-deps --verbose --color always
@AndyShiue
AndyShiue / CuTT.md
Last active January 29, 2025 14:35
Cubical type theory for dummies

I think I’ve figured out most parts of the cubical type theory papers; I’m going to take a shot to explain it informally in the format of Q&As. I prefer using syntax or terminologies that fit better rather than the more standard ones.

Q: What is cubical type theory?

A: It’s a type theory giving homotopy type theory its computational meaning.

Q: What is homotopy type theory then?

A: It’s traditional type theory (which refers to Martin-Löf type theory in this Q&A) augmented with higher inductive types and the univalence axiom.

@william8th
william8th / .tmux.conf
Last active May 13, 2025 08:46
Tmux open new pane in same directory
# Set the control character to Ctrl+Spacebar (instead of Ctrl+B)
set -g prefix C-space
unbind-key C-b
bind-key C-space send-prefix
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
@seanjensengrey
seanjensengrey / octal_x86.txt
Last active January 13, 2025 22:43
x86 is an octal machine
# source:http://geocities.com/SiliconValley/heights/7052/opcode.txt
From: [email protected] (Mark Hopkins)
Newsgroups: alt.lang.asm
Subject: A Summary of the 80486 Opcodes and Instructions
(1) The 80x86 is an Octal Machine
This is a follow-up and revision of an article posted in alt.lang.asm on
7-5-92 concerning the 80x86 instruction encoding.
The only proper way to understand 80x86 coding is to realize that ALL 80x86
@dmsul
dmsul / vim_crash_course.md
Last active May 4, 2025 21:20
Vim Crash Course

NOTE: Specific examples given for options, flags, commands variations, etc., are not comprehensive.

NORMAL MODE

Vim has 2 main "modes", that chance the behavior of all your keys. The default mode of Vim is Normal Mode and is mostly used for moving the cursor and navigating the current file.

Some important (or longer) commands begin with ":" and you will see the text you enter next at the bottom left of the screen.

:q[uit] - quit (the current window of) Vim. ("Window" here is internal to Vim, not if you have multiple OS-level windows of Vim open at once.)
:q! - force quit (if the current buffer has been changed since the last save)
:e[dit] {filename} - read file {filename} into a new buffer.

@cjxgm
cjxgm / rust-wasm-archlinux.md
Last active February 23, 2021 05:21
Rust + WebAssembly Guide, on Arch Linux

Rust + WebAssembly Guide, on Arch Linux

Motivation

It's just too complex to make Rust+WASM work on macOS, but all the other guides online target macOS. This guide targets only Arch Linux. If your favorate distro is great, you should be able to do the same thing.

Setup

Install rustup and emscripten with the distro's native package manager.