Skip to content

Instantly share code, notes, and snippets.

View novusnota's full-sized avatar
:accessibility:
be curious, do better, and remember — it's more fun to be competent

Novus Nota novusnota

:accessibility:
be curious, do better, and remember — it's more fun to be competent
View GitHub Profile
@VictorTaelin
VictorTaelin / sat.md
Last active October 16, 2025 10:51
Simple SAT Solver via superpositions

Solving SAT via interaction net superpositions

I've recently been amazed, if not mind-blown, by how a very simple, "one-line" SAT solver on Interaction Nets can outperform brute-force by orders of magnitude by exploiting "superposed booleans" and optimal evaluation of λ-expressions. In this brief note, I'll provide some background for you to understand how this works, and then I'll present a simple code you can run in your own computer to observe and replicate this effect. Note this is a new observation, so I know little about how this algorithm behaves asymptotically, but I find it quite

@novusnota
novusnota / add_this_snippet_to_your_fish_shell_config.fish
Created September 12, 2023 12:49
Simplest way of using https://sdkman.io/ under Fish Shell — add the snippet from the file below to your ~/.config/fish/config.fish and call it a day! No more how to use sdkman with fish issues, a simple wrapper is all you need.
# Simplest way of using https://sdkman.io/ under Fish Shell:
# Add the snippet from the file below to your ~/.config/fish/config.fish and call it a day!
# Note: while this trick works, it doesn't give you auto-completion options.
function sdk
bash -c "source '$HOME/.sdkman/bin/sdkman-init.sh'; sdk $argv[2..-1]"
end
@AmolPardeshi99
AmolPardeshi99 / Github-Markdown-Emoji-Symbols.md
Last active October 8, 2025 15:30
CheatSheet for all Github icons in Markdown language for your better Readme file.

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@hirrolot
hirrolot / tagless-final.rs
Last active December 2, 2024 20:28
Tagless-final encoding of a simple arithmetic language in Rust
trait Interp {
type Repr<T>;
fn lit(i: i32) -> Self::Repr<i32>;
fn add(a: Self::Repr<i32>, b: Self::Repr<i32>) -> Self::Repr<i32>;
}
struct Eval;
impl Interp for Eval {
@novusnota
novusnota / run.jl
Created October 27, 2022 11:28
A small Julia-based script, which allows usage of 'and' and 'or' keywords instead of '&&' and '||' infix operators in Julia programs.
#!/usr/bin/env julia
##
# A small script, written in Julia, which allows usage of 'and' and 'or' keywords instead of '&&' and '||' infix operators in Julia programs.
# Made out of desperation after reading this discussion: https://github.com/JuliaLang/julia/issues/5238
# Notice, that run.jl **doesn't** modify the original file.
#
# Use it simply so:
# $> julia run.jl <filename>
# or by giving the file execution rights and then running:
@novusnota
novusnota / d.sh
Last active June 2, 2023 12:01
Extremely simple and useful bash script for controlled tests inside clean environments provided by docker containers. Run it to quickly jump into docker container instance of your choice with network mode set to host, which means all your opened ports on host machine would be easily accessible from the container and vice versa! When you finish p…
#!/usr/bin/env bash
##
# 0. (A must) Leave a star on this GIST :P
# 1. Clone/download/copy-paste the this script
# 2. Give it rights to execute: `chmod +x d.sh`
# 3. Move it somewhere on your PATH and (optionally) rename it on the fly: `mv d.sh /usr/local/bin/d`
# 4. Now run it from anywhere: `d` or `d.sh` (if you didn't rename your file)
# 5. ???
# 6. Hooray! You're inside the container! Enjoy your stay & mess around as much as you want!
@sindresorhus
sindresorhus / esm-package.md
Last active November 11, 2025 10:00
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@novusnota
novusnota / .vimrc
Last active November 6, 2025 20:12
Простая конфигурация, конфиг Vim для тех, у кого русско-английская клавиатура. Для русскоязычных, короче (duh). Минималистичная, минимум плагинов, но с развёрнутым описанием каждой функции, настройки и команды.
" Простая конфигурация Vim для пользователей с русско-английской клавиатурой
" Как правило, русскоязычных (duh)
" Минималистичная, минимум плагинов, но с развёрнутым описанием каждой функции, настройки и команды
" Работает для Vim 8.*, скомпилированного по максимуму.
" Чистый конфиг, без использования менеджеров плагинов.
" Цветовые схемы вручную копировал в папку ~/.vim/
" Также, ручками добавил
" lightline и NERDTree в ~/.vim/pack/plugins/start,
@fnky
fnky / ANSI.md
Last active November 11, 2025 12:36
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active November 12, 2025 07:53
set -e, -u, -o, -x pipefail explanation