Skip to content

Instantly share code, notes, and snippets.

View Kerollmops's full-sized avatar
🍼
Meilisearch needs care

Clément Renault Kerollmops

🍼
Meilisearch needs care
View GitHub Profile
anonymous
anonymous / Cargo.toml
Created November 12, 2015 01:18
[package]
name = "fst-int"
version = "0.1.0"
authors = ["Andrew Gallant <[email protected]>"]
[dependencies]
byteorder = "0.4"
fst = "0.1"
@Kerollmops
Kerollmops / memmove_details.md
Last active April 24, 2016 15:20
French memmove details

memmove details

memmove

void *memmove(void *dst, const void *src, size_t len);

Copier la source dans la destination d'une maniere non destructive.

@danieleggert
danieleggert / GPG and git on macOS.md
Last active March 6, 2025 20:45
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@mwcz
mwcz / memlog.sh
Created November 8, 2016 03:08
A simple script to create graphs of memory usage of Linux processes.
#!/usr/bin/env bash
# usage: memlog.sh PID
# requires gnuplot and matplotlib (dnf install python2-matplotlib gnuplot)
PID=$1
LOG=./$PID.log
PNG=./$PID.log.png
echo recording memory usage for PID $PID
@tomaka
tomaka / gist:61807c08693604c25fc9a585220f46cc
Last active October 12, 2017 14:23
Creating a tasks system based on Rust coroutines

Let's take the first example from the Rust generators RFC:

#[async]
fn print_lines() -> io::Result<()> {
    let addr = "127.0.0.1:8080".parse().unwrap();
    let tcp = await!(TcpStream::connect(&addr))?;
    ...
}
@Kerollmops
Kerollmops / bench_script.sh
Last active August 15, 2018 10:38
A little script made to help making rust benchmarks comparisons using git revisions
#!/bin/sh
# This env variable is here to permit
# to use a custom `cargo bench` command if needed
CARGO_BENCH_CMD=${CARGO_BENCH_CMD:-cargo bench}
if [ $# -eq 0 ]; then
echo "comparing benchmarks of HEAD~1 and HEAD..."
OLD=$(git rev-parse --short 'HEAD~1')
NEW=$(git rev-parse --short 'HEAD')

Core Coding Standard

Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.

Table Of Contents

@loganvolkers
loganvolkers / Byte Formatting for Google Sheets.md
Last active June 26, 2025 10:21
Byte formatting for Google Sheets