Skip to content

Instantly share code, notes, and snippets.

@cfsamson
cfsamson / green_threads_start.rs
Last active January 7, 2021 05:33
Green_threads_code
#![feature(asm)]
// Lets set a small stack size here, only 48 bytes so we can print the stack
// and look at it before we switch contexts
// ===== NOTICE FOR OSX USERS =====
// You'll need to increase this size to at least 624 bytes. This will work in Rust Playground and on Windows
// but the extremely small stack seems to have an issue on OSX.
const SSIZE: isize = 48;
/// Do you recognize these? It's the registers described in the x86-64 ABI that we'll need to save our context.
@kristianmitk
kristianmitk / keybindings.json
Last active May 7, 2019 08:20
VSCode key bindings
[
{
"key": "cmd+k cmd+b",
"command": "workbench.action.toggleActivityBarVisibility"
},
{ "key": "cmd+k cmd+0", "command": "editor.foldAll" },
{
"key": "cmd+0 cmd+K",
"command": "editor.unfoldAll"
},
@AaronM04
AaronM04 / linked_list.rs
Last active March 2, 2020 03:38 — forked from codesections/linked_list.rs
A simple linked list implemented in Rust
#[derive(Debug)]
pub struct LinkedList {
head: Option<Box<Node>>,
tail: Option<*mut Node>,
}
#[derive(Debug)]
struct Node {
value: i32,
next: Option<Box<Node>>,
}
/**
* The shape we are building.
*/
interface IPoint {
x: number;
y: number;
z?: number;
}
class Point implements IPoint {
@yagop
yagop / insomnia.sh
Created April 21, 2017 11:21
Insomnia REST Client Arch installer
#! /bin/bash
cd $(mktemp -d)
wget https://aur.archlinux.org/cgit/aur.git/snapshot/insomnia.tar.gz
tar xzf insomnia.tar.gz
cd insomnia
makepkg -s
sudo pacman -U insomnia-*-x86_64.pkg.tar
@citrusui
citrusui / dropdown.md
Last active June 15, 2024 05:12
"Dropdowns" in Markdown
How do I dropdown?
This is how you dropdown.

<details>
<summary>How do I dropdown?</summary>
<br>
This is how you dropdown.
@rxaviers
rxaviers / gist:7360908
Last active June 17, 2024 06:20
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: