Skip to content

Instantly share code, notes, and snippets.

View nvictor's full-sized avatar

Victor Noagbodji nvictor

View GitHub Profile
ffmpeg -i input.mp3 output.wav
@nvictor
nvictor / hn.js
Last active May 17, 2020 02:55
Collapse all comments on HN
for (tag of byClass(document, "togg")) {
if (tag.text.slice(0, 2) === "[–") { tag.click(); }
if (parseInt(tag.getAttribute("n")) > 5) { tag.style.color = "red"; }
}
@nvictor
nvictor / rename_lower.sh
Created December 30, 2019 09:45
Rename files to lowercase (non recursive)
for f in *.txt; do mv "$f" "$(echo $f | tr '[A-Z]' '[a-z]')"; done
@nvictor
nvictor / search_github.txt
Created January 19, 2020 15:40
GitHub search
# python repositories, sorted by stars descending
https://www.github.com/topics/python?o=desc&s=stars
@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 / db_sizes.sql
Created February 20, 2020 23:34
Database sizes
select name, pg_size_pretty(pg_database_size(datname)) as size from pg_database;
@nvictor
nvictor / ffmpeg_mp3.sh
Last active November 13, 2020 02:54
ffmpeg_mp3.sh
ffmpeg -i input.mp4 output.mp3
ffmpeg -i input.m4a output.mp3
@nvictor
nvictor / tiny.c
Created July 3, 2020 22:31
tiny.c
/* file: "tinyc.c" */
/* Copyright (C) 2001 by Marc Feeley, All Rights Reserved. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* This is a compiler for the Tiny-C language. Tiny-C is a
@nvictor
nvictor / notes_frequencies.md
Last active October 1, 2020 22:34
notes_frequencies.md
@nvictor
nvictor / instruments_ranges.md
Last active October 3, 2020 17:54
instruments_ranges.md

Orchestra Instruments Ranges

Sources:

Middle C = C4

Note: These are merely suggestions. Check your instruments. The harmonics are from the Vienna Symphony website.