% 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
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": |
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
^~~~~~~~~~
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
# 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), | |
# } | |
# |