Skip to content

Instantly share code, notes, and snippets.

View nvictor's full-sized avatar

Victor Noagbodji nvictor

View GitHub Profile
@nvictor
nvictor / xcode_cli_install.sh
Created December 23, 2022 17:14
xcode_cli_install.sh
xcode-select --install
@nvictor
nvictor / bash_options.sh
Last active September 12, 2022 12:44
Bash set options
#!/usr/bin/env bash
set -o errexit -o nounset -o xtrace -o pipefail
# or (set -euxo pipefail)
# See: https://tldp.org/LDP/abs/html/options.html
@nvictor
nvictor / empty_files.sh
Created September 3, 2022 12:32
empty_files.sh
find . -type f -empty
@nvictor
nvictor / bigrams.sh
Created August 30, 2022 19:40
bigrams.sh
awk '{for (i=1; i<NF; i++) print $i, $(i+1)}'
@nvictor
nvictor / sounds_names.md
Last active August 30, 2022 03:59
sounds_names.md
english french
buzzing bourdonnement
clinking cliquetis (tintement)
clanging cliquetis (métalique)
cracking claquement (tonnerre)
creaking grincement (métal)
crunching craquement
grunting grognement
@nvictor
nvictor / common_words.txt
Created August 29, 2022 16:26
common_words.txt
# Remove this line! Original: /usr/share/groff/current/eign
a
i
the
to
of
and
in
is
it
@nvictor
nvictor / top_words.sh
Last active August 29, 2022 16:24
top_words.sh
# basic
cat **/*.txt | tr -sc "[:alnum:]" "\n" | tr "[:upper:]" "[:lower:]" | sort | uniq -c | sort -nr | head -10
# remove stop / common words
cat **/*.txt | tr -sc "[:alnum:]" "\n" | tr "[:upper:]" "[:lower:]" | fgrep --word-regexp --invert-match --file common_words.txt | sort | uniq -c | sort -nr | head -10
@nvictor
nvictor / remove_edge_favorites_mac.sh
Last active August 2, 2022 14:09
remove_edge_favorites_mac.sh
# edge://version shows the path to the profile folder
cd /Users/victor/Library/Application\ Support/Microsoft\ Edge/Default/
rm Bookmarks
rm Bookmarks.msbak
@nvictor
nvictor / better_error_messages.py
Created May 8, 2022 12:19
better_error_messages.py
# NOTE(victor): the error is the unclosed print() statement
print("""Are we getting better error messages yet?"""
if __name__ == "__main__":
print("Are we?")
@nvictor
nvictor / systems.txt
Last active November 22, 2021 03:14
systems.txt
thinking in systems by donella meadows
a) the behavior of a system cannot be known by just knowing the elements
of which the system is made — blind men and elephant
b) a system is more than the sum of its parts — made of parts,
interconnections, purpose. changing interconnections and purpose change
the system
c) stocks are important elements in a system — connected by flows