Skip to content

Instantly share code, notes, and snippets.

@LukasKalbertodt
LukasKalbertodt / 0-rust-wasm-llvm-backend.md
Last active Sep 22, 2020
Several Rust & WebAssembly notes
View 0-rust-wasm-llvm-backend.md

Compiling Rust to Wasm manually with the LLVM wasm-backend (without Emscripten)

EDIT November 2017: recently the target wasm32-unknown-unknown was added to rustc which uses the LLVM WASM backend and works without Emscripten. This is now the recommended way of generating WASM code from Rust (as it is much easier). Thus, this gist document is pretty much useless now. A great resource on getting started with WASM and Rust is hellorust.com: Setup and Minimal Example.





@Michael0x2a
Michael0x2a / minimal-template.tex
Last active Sep 3, 2020
Minimal LaTeX template
View minimal-template.tex
\documentclass{article}
% General document formatting
\usepackage[margin=0.7in]{geometry}
\usepackage[parfill]{parskip}
\usepackage[utf8]{inputenc}
% Related to math
\usepackage{amsmath,amssymb,amsfonts,amsthm}
\begin{document}
@eligrey
eligrey / leaks.md
Last active Jun 6, 2020
Companies/websites that have sold or leaked my personal information
View leaks.md

Personally identifiable information leaks

The following companies/websites have either sold or leaked personally identifiable information about me, including email addresses and phone numbers. Be wary of sharing your data with them.

Email addresses

These companies/websites have either sold or leaked specific unique email addresses of mine to unauthorized parties, such as spammers.

@jirutka
jirutka / rules-both.iptables
Created Sep 18, 2012
Basic iptables template for ordinary servers (both IPv4 and IPv6)
View rules-both.iptables
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@jboner
jboner / latency.txt
Last active Oct 22, 2020
Latency Numbers Every Programmer Should Know
View latency.txt
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
View regex-weburl.js
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
You can’t perform that action at this time.