Skip to content

Instantly share code, notes, and snippets.

View danielhenrymantilla's full-sized avatar
🦀

Daniel Henry-Mantilla danielhenrymantilla

🦀
View GitHub Profile
@danielhenrymantilla
danielhenrymantilla / latest-stable-rustc.md
Created October 5, 2020 19:37 — forked from alexheretic/latest-stable-rustc.md
Latest stable rust as a MSRV policy

Latest stable rust as a minimum

Minimum supported rust version (MSRV) policy that indicates the most recent stable rust release is the minimum whenever a new crate version is published. It is not required to bump a crate's major version after a new stable compiler is released.

For example crate_foo version 0.1.2 published on 2018-12-28 has MSRV 1.31.1 as this compiler was published on 2018-12-20.

The advantages of this approach is simplicity in maintaining a crate's code.

Workarounds for older compiler versions

If you are unable to update your compiler, you may be unable to update crate dependencies following this policy.

@danielhenrymantilla
danielhenrymantilla / death_letter.tex
Created October 12, 2018 14:27 — forked from aeris/death_letter.tex
Lettre de la mort GDPR
\documentclass[10pt]{lettre}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{eurosym}
\usepackage{enumitem}
\usepackage[frenchb]{babel}
\begin{document}
\begin{letter}{
@danielhenrymantilla
danielhenrymantilla / hexdump_tool_by_yandros.c
Created July 30, 2018 12:41
Hexdump tool to "copy-paste" binaries into a shell. Useful for root-me.org VM challenges.
/* Hexdump tool to "copy-paste" binaries into a shell.
* Useful for root-me.org VM challenges.
* Compile with:
* $ cc -std=c99 -o slice slice.c
*
* By Yandros (https://www.root-me.org/Yandros)
*/
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
@danielhenrymantilla
danielhenrymantilla / lib.rs
Created July 7, 2018 13:21
Rust: &self sugar vs other &identifier bindings
/* The following lib tests illustrate a lack of consistency in rust:
* the &identifier binding leads to 2 different behaviors based on whether
* - the identifier is the special 'self' first argument of a method,
* - or a simple variable / argument (called slf in the following tests)
*/
#![allow(dead_code, unused_variables, unused_parens)]
/* compiler ensures that check_ref::<T>(x) can only be called iff x: &T */
fn check_ref<T> (_: &T) {}