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
@Kerollmops
Kerollmops / keymap.json
Last active April 25, 2024 14:47
This is my zed keymap who fake the Sublime Text ones as mush as possible.
[
{
"bindings": {
"cmd-shift-[": "pane::ActivatePrevItem",
"cmd-shift-]": "pane::ActivateNextItem",
"ctrl-pagedown": "pane::ActivatePrevItem",
"ctrl-pageup": "pane::ActivateNextItem",
"ctrl-shift-tab": "pane::ActivateNextItem",
"ctrl-tab": "pane::ActivatePrevItem",
"cmd-+": "zed::IncreaseBufferFontSize"

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

@Kerollmops
Kerollmops / par_build_tree.cpp
Last active December 15, 2023 16:29
Using Spotify/Annoy to index some vectors in parallel
/*
* par_build_tree.cpp
*
* Move this in the examples folder of Annoy and compile it like the other c++ example.
*
* Created on: Dec 6, 2023
* Author: Clément Renault
*/
@Kerollmops
Kerollmops / pushover.sh
Created December 9, 2023 10:10
A very simple bash/shell function to push messages through pushover
# Create an API KEY there: https://pushover.net/apps/build
# Find your user TOKEN here: https://pushover.net
#
# Note that the `title` field is optional and don't forget to put double quotes
# around your argument when calling this function.
#
# Here is a small example of pipping logs through pushover:
#
# nohup tail -f nohup.out | while read l; do pushover "$l"; done &
#
@Kerollmops
Kerollmops / keymap.json
Last active July 5, 2023 15:24
The settings I use in https://zed.dev
{}
@Kerollmops
Kerollmops / index-stats.rs
Created June 21, 2023 14:16
A small program that computes the stats of an LMDB Meilisearch index.
//! A small program that computes the stats of an LMDB Meilisearch index.
//!
//! ```cargo
//! [dependencies]
//! anyhow = "1.0.71"
//! clap = { version = "4.3.5", features = ["derive"] }
//! heed = "0.20.0-alpha.1"
//! ```
use std::path::PathBuf;
@Kerollmops
Kerollmops / export-imdb-sqlite.md
Last active January 23, 2023 16:15
Export a nd-JSON/JSON stream from the multiple IMDB TSVs
@Kerollmops
Kerollmops / memlog.sh
Last active July 24, 2021 12:55
Record memory usage of a process
#!/usr/bin/env bash
# usage: memlog.sh $(pidof PROCESS_NAME) [ PATH_FOLDER ]
# on osx pidof can be replaced by pgrep
# usage: memlog.sh $(pgrep PROCESS_NAME) [ PATH_FOLDER ]
set -e
PID=$1
@Kerollmops
Kerollmops / valid_I_25.fillit.md
Last active March 19, 2021 17:36
Fillit timings experiments - AMD EPYC 7401P 24- (4) @ 1.996GHz

Julow - 140h+

Never finished...

Rust - 140h+

Never finished...

Rust #2 - 281m34.146s

@Kerollmops
Kerollmops / rsync-ssh.sh
Created March 19, 2020 10:14
Remote sync a cargo repository by using fswatch and ssh with a custom identity key.
fswatch --exclude '.git' --exclude 'target' . | while read num; do
rsync -azP --exclude=.git --exclude=target -e 'ssh -i ~/.ssh/id_rsa' . root@xxx.xxx.xxx.xxx:<DEST>
done