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 / 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 / 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 / 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 / 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 / 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
@nvictor
nvictor / ffmpeg_frames.sh
Created July 23, 2021 03:14
ffmpeg_frames.sh
ffmpeg -i input.mp4 -ss 00:00:00.000 -t ddd output_%03d.png
@nvictor
nvictor / tmux_term_setting.sh
Created April 10, 2021 19:05
tmux_term_setting.sh
# Because if you don't do this tmux will default to screen...
# See: https://github.com/zsh-users/zsh-autosuggestions/issues/229
if [ ! "$TMUX" = "" ]; then export TERM=xterm-256color; fi