-
On WSL2, install the Debian distribution from the microsoft store, then open
wsl.exe
in a terminal. I recommand using the Microsoft Terminal (this feels weird to say, since I'm more a linux user than a windows user, but when you NEED to use windows....)It should open the Debian distrib, with a small bootstrapping script to create a user.
-
Now update the apt package repositories with
sudo apt update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// References: | |
// | |
// Wikipedia IPv4 / IPv6: | |
// - https://en.wikipedia.org/wiki/IPv4 | |
// - https://en.wikipedia.org/wiki/IPv6_packet | |
// | |
// Working implem: | |
// - https://www.binarytides.com/packet-sniffer-code-in-c-using-linux-sockets-bsd-part-2/ | |
#include <unistd.h> // close |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Taken from https://stackoverflow.com/a/59040037/5655255 | |
# and adapted to be a proper cli tool. | |
function UnicodePointToUtf8 | |
{ | |
# Normalize input | |
local x="$1" # ok if '0x2620' | |
x=${x/\\u/0x} # '\u2620' -> '0x2620' | |
x=${x/U+/0x}; x=${x/u+/0x} # 'U+2620' -> '0x2620' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is an ugly copy/paste from https://getemoji.com/ | |
😀 😃 😄 😁 😆 😅 😂 🤣 ☺️ 😊 😇 🙂 🙃 😉 😌 😍 🥰 😘 😗 😙 😚 😋 😛 😝 😜 🤪 🤨 🧐 🤓 😎 🤩 🥳 😏 😒 😞 😔 😟 😕 🙁 ☹️ 😣 😖 😫 😩 🥺 😢 😭 😤 😠 😡 🤬 🤯 😳 🥵 🥶 😱 😨 😰 😥 😓 🤗 🤔 🤭 🤫 🤥 😶 😐 😑 😬 🙄 😯 😦 😧 😮 😲 🥱 😴 🤤 😪 😵 🤐 🥴 🤢 🤮 🤧 😷 🤒 🤕 🤑 🤠 😈 👿 👹 👺 🤡 💩 👻 💀 ☠️ 👽 👾 🤖 🎃 😺 😸 😹 😻 😼 😽 🙀 😿 😾 | |
Gestures and Body Parts | |
👋 🤚 🖐 ✋ 🖖 👌 🤏 ✌️ 🤞 🤟 🤘 🤙 👈 👉 👆 🖕 👇 ☝️ 👍 👎 ✊ 👊 🤛 🤜 👏 🙌 👐 🤲 🤝 🙏 ✍️ 💅 🤳 💪 🦾 🦵 🦿 🦶 👂 🦻 👃 🧠 🦷 🦴 👀 👁 👅 👄 💋 🩸 | |
People and Fantasy | |
👶 🧒 👦 👧 🧑 👱 👨 🧔 👨🦰 👨🦱 👨🦳 👨🦲 👩 👩🦰 🧑🦰 👩🦱 🧑🦱 👩🦳 🧑🦳 👩🦲 🧑🦲 👱♀️ 👱♂️ 🧓 👴 👵 🙍 🙍♂️ 🙍♀️ 🙎 🙎♂️ 🙎♀️ 🙅 🙅♂️ 🙅♀️ 🙆 🙆♂️ 🙆♀️ 💁 💁♂️ 💁♀️ 🙋 🙋♂️ 🙋♀️ 🧏 🧏♂️ 🧏♀️ 🙇 🙇♂️ 🙇♀️ 🤦 🤦♂️ 🤦♀️ 🤷 🤷♂️ 🤷♀️ 🧑⚕️ 👨⚕️ 👩⚕️ 🧑🎓 👨🎓 👩🎓 🧑🏫 👨🏫 👩🏫 🧑⚖️ 👨⚖️ 👩⚖️ 🧑🌾 👨🌾 👩🌾 🧑🍳 👨🍳 👩🍳 🧑🔧 👨🔧 👩🔧 🧑🏭 👨🏭 👩🏭 🧑💼 👨💼 👩💼 🧑🔬 👨🔬 👩🔬 🧑💻 👨💻 👩💻 🧑🎤 👨🎤 👩🎤 🧑🎨 👨🎨 👩🎨 🧑✈️ 👨✈️ 👩✈️ 🧑🚀 👨🚀 👩🚀 🧑🚒 👨🚒 👩🚒 👮 👮♂️ 👮♀️ 🕵 🕵️♂️ 🕵️♀️ 💂 💂♂️ 💂♀️ 👷 👷♂️ 👷♀️ 🤴 👸 👳 👳♂️ 👳♀️ 👲 🧕 🤵 👰 🤰 🤱 👼 🎅 🤶 🦸 🦸♂️ 🦸♀️ 🦹 🦹♂️ 🦹♀️ 🧙 🧙♂️ 🧙♀️ 🧚 🧚♂️ 🧚♀️ 🧛 🧛♂️ 🧛♀️ 🧜 🧜♂️ 🧜♀️ 🧝 🧝♂️ 🧝♀️ 🧞 🧞♂️ 🧞♀️ 🧟 🧟♂️ 🧟♀️ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
stdenv.mkDerivation { | |
name = "test-crystal-project"; | |
# Define that the build will need the crystal binary (and all its deps) | |
buildInputs = [ | |
crystal | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####### | |
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": |