Skip to content

Instantly share code, notes, and snippets.

View bew's full-sized avatar
😎
https://nohello.net

Benoit de Chezelles bew

😎
https://nohello.net
View GitHub Profile
This is an ugly copy/paste from https://getemoji.com/
😀 😃 😄 😁 😆 😅 😂 🤣 ☺️ 😊 😇 🙂 🙃 😉 😌 😍 🥰 😘 😗 😙 😚 😋 😛 😝 😜 🤪 🤨 🧐 🤓 😎 🤩 🥳 😏 😒 😞 😔 😟 😕 🙁 ☹️ 😣 😖 😫 😩 🥺 😢 😭 😤 😠 😡 🤬 🤯 😳 🥵 🥶 😱 😨 😰 😥 😓 🤗 🤔 🤭 🤫 🤥 😶 😐 😑 😬 🙄 😯 😦 😧 😮 😲 🥱 😴 🤤 😪 😵 🤐 🥴 🤢 🤮 🤧 😷 🤒 🤕 🤑 🤠 😈 👿 👹 👺 🤡 💩 👻 💀 ☠️ 👽 👾 🤖 🎃 😺 😸 😹 😻 😼 😽 🙀 😿 😾
Gestures and Body Parts
👋 🤚 🖐 ✋ 🖖 👌 🤏 ✌️ 🤞 🤟 🤘 🤙 👈 👉 👆 🖕 👇 ☝️ 👍 👎 ✊ 👊 🤛 🤜 👏 🙌 👐 🤲 🤝 🙏 ✍️ 💅 🤳 💪 🦾 🦵 🦿 🦶 👂 🦻 👃 🧠 🦷 🦴 👀 👁 👅 👄 💋 🩸
People and Fantasy
👶 🧒 👦 👧 🧑 👱 👨 🧔 👨‍🦰 👨‍🦱 👨‍🦳 👨‍🦲 👩 👩‍🦰 🧑‍🦰 👩‍🦱 🧑‍🦱 👩‍🦳 🧑‍🦳 👩‍🦲 🧑‍🦲 👱‍♀️ 👱‍♂️ 🧓 👴 👵 🙍 🙍‍♂️ 🙍‍♀️ 🙎 🙎‍♂️ 🙎‍♀️ 🙅 🙅‍♂️ 🙅‍♀️ 🙆 🙆‍♂️ 🙆‍♀️ 💁 💁‍♂️ 💁‍♀️ 🙋 🙋‍♂️ 🙋‍♀️ 🧏 🧏‍♂️ 🧏‍♀️ 🙇 🙇‍♂️ 🙇‍♀️ 🤦 🤦‍♂️ 🤦‍♀️ 🤷 🤷‍♂️ 🤷‍♀️ 🧑‍⚕️ 👨‍⚕️ 👩‍⚕️ 🧑‍🎓 👨‍🎓 👩‍🎓 🧑‍🏫 👨‍🏫 👩‍🏫 🧑‍⚖️ 👨‍⚖️ 👩‍⚖️ 🧑‍🌾 👨‍🌾 👩‍🌾 🧑‍🍳 👨‍🍳 👩‍🍳 🧑‍🔧 👨‍🔧 👩‍🔧 🧑‍🏭 👨‍🏭 👩‍🏭 🧑‍💼 👨‍💼 👩‍💼 🧑‍🔬 👨‍🔬 👩‍🔬 🧑‍💻 👨‍💻 👩‍💻 🧑‍🎤 👨‍🎤 👩‍🎤 🧑‍🎨 👨‍🎨 👩‍🎨 🧑‍✈️ 👨‍✈️ 👩‍✈️ 🧑‍🚀 👨‍🚀 👩‍🚀 🧑‍🚒 👨‍🚒 👩‍🚒 👮 👮‍♂️ 👮‍♀️ 🕵 🕵️‍♂️ 🕵️‍♀️ 💂 💂‍♂️ 💂‍♀️ 👷 👷‍♂️ 👷‍♀️ 🤴 👸 👳 👳‍♂️ 👳‍♀️ 👲 🧕 🤵 👰 🤰 🤱 👼 🎅 🤶 🦸 🦸‍♂️ 🦸‍♀️ 🦹 🦹‍♂️ 🦹‍♀️ 🧙 🧙‍♂️ 🧙‍♀️ 🧚 🧚‍♂️ 🧚‍♀️ 🧛 🧛‍♂️ 🧛‍♀️ 🧜 🧜‍♂️ 🧜‍♀️ 🧝 🧝‍♂️ 🧝‍♀️ 🧞 🧞‍♂️ 🧞‍♀️ 🧟 🧟‍♂️ 🧟‍♀️
@bew
bew / ovh-dedicated-wipe-and-install-nixos.sh
Created June 11, 2020 07:28 — forked from nh2/ovh-dedicated-wipe-and-install-nixos.sh
Example script to install NixOS on an OVH dedicated server via the OVH rescue mode
#!/usr/bin/env bash
# Installs NixOS on an OVH server, wiping the server.
#
# This is for a specific server configuration; adjust where needed.
# Originally written for an OVH STOR-1 server.
#
# Prerequisites:
# * Create a LUKS key file at /root/benacofs-luks-key
# e.g. by copying it up.
@bew
bew / nixos install tools.nix
Created April 11, 2020 19:22
Nix derivation that makes the nixos install tools available on any Nix-enabled system
let
nixos-expr = builtins.fetchTarball {
url = "https://nixos.org/channels/nixos-20.03-small/nixexprs.tar.xz";
sha256 = "1a5d5qpmakyvqzn99x7p5lc4114mynk9wpz4mrzbixmmp4njxz75";
};
nixos = import "${nixos-expr}/nixos" { configuration = {}; };
nixos-install-tools = with nixos.config.system.build; [
nixos-generate-config
@bew
bew / show-dir.nix
Created April 10, 2020 02:07
My first Nix semi-complex-expr! Show files with type in a directory
# Used docs:
#
# Builtins reference (not exaustive): https://nixos.org/nix/manual/#ssec-builtins
#
# nixpkgs in lib/attrsets.nix: (all functions for manipulating attributes sets)
# https://github.com/NixOS/nixpkgs/blob/c7e0e9ed5abd0043e50ee371129fcb8640264fc4/lib/attrsets.nix
#
# nixpkgs in lib/lists.nix: (all functions for manipulating lists)
# https://github.com/NixOS/nixpkgs/blob/6ff181331874fa1004ef187d97367bd762dc8c46/lib/lists.nix#L1
# This isn't meant to be ran as a script, but line-by-line
# Props to Binary (benary.org) for helping me with this
# 0: Create a Scaleway instance and SSH into it
ssh root@...
# 1: Install Nix
adduser user # set a password, doesn't matter what because it's not staying long
adduser user sudo
su -l user
@bew
bew / default--hello-crystal.nix
Last active December 16, 2019 22:10
Hello world using Nix to package a crystal program
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "test-crystal-project";
# Define that the build will need the crystal binary (and all its deps)
buildInputs = [
crystal
];
@bew
bew / lsp_crystal_slow.log
Created September 23, 2019 22:41
Annotated LSP logs from LanguageClient-neovim for crystal server (slow...)
#######
LanguageClient 0.1.147
#######
# (nvim rpc) 23:03:42 INFO writer-None src/rpcclient.rs:215 => None {"jsonrpc":"2.0","method":"eval","params":["[!!get(g:, 'LanguageClient_autoStart', 1), s:GetVar('LanguageClient_serverCommands', {}), get(g:, 'LanguageClient_selectionUI', v:null), get(g:, 'LanguageClient_trace', v:null), expand(get(g:, 'LanguageClient_settingsPath', '.vim/settings.json')), !!get(g:, 'LanguageClient_loadSettings', 1), get(g:, 'LanguageClient_rootMarkers', v:null), get(g:, 'LanguageClient_changeThrottle', v:null), get(g:, 'LanguageClient_waitOutputTimeout', v:null), !!get(g:, 'LanguageClient_diagnosticsEnable', 1), get(g:, 'LanguageClient_diagnosticsList', 'Quickfix'), get(g:, 'LanguageClient_diagnosticsDisplay', {}), get(g:, 'LanguageClient_windowLogMessageLevel', 'Warning'), get(g:, 'LanguageClient_hoverPreview', 'Auto'), get(g:, 'LanguageClient_completionPreferTextEdit', 0), has('nvim')]"],"id":3}
# (nvim rpc) 23:03:42 INFO reader-None src/rpcclient.rs:169 <= None {"id": 3, "jsonrpc":

It works!!

% cr in_mem_system_env.cr
system env: get SPEC_VERBOSE
system env: get HOME
mem env: get HOME
mem env: set HOME → my super home!
mem env: get HOME
system env: get HOME
@bew
bew / fail1 - pluggable system in crystal.md
Last active May 6, 2019 21:02
FAIL 1 - Pluggable system in crystal

Doesn't work:

 % cr in_mem_system_env.cr
Error in pluggable_system_env.cr:25: class variable '@@current_impl' of PluggableSystem::Env must be PluggableSystem::Env::Interface:Module, not Crystal::System::Env:Module

  class_getter current_impl : Interface.class = OS_BACKEND
                                                ^~~~~~~~~~

@bew
bew / rust enum in crystal.cr
Last active April 29, 2019 13:10
Rust's multi-type enum implementation in Crystal
# simplified example from rust:
# (https://github.com/srwalter/dbus-serialize/blob/b87fd9f78d9/src/types.rs)
#
# pub enum BasicValue {
# Byte(u8),
# Boolean(bool),
# Double(f64),
# Int16(i16),
# }
#