Skip to content

Instantly share code, notes, and snippets.

View gsgoncalves's full-sized avatar

Gustavo Gonçalves gsgoncalves

  • Barcelona, Spain
  • 18:40 (UTC +02:00)
View GitHub Profile
@gsgoncalves
gsgoncalves / convert-all-vids-to-mp3.sh
Created November 16, 2022 18:36
Bash one liner to convert the audio codec of all EAC3 files to MP3
for file in *.mkv; do ffmpeg -i "$file" -map 0 -c copy -c:a mp3 "${file/EAC3/MP3}"; done
@gsgoncalves
gsgoncalves / private_fork.md
Created November 7, 2022 03:13 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@gsgoncalves
gsgoncalves / jq-wapo-examples.txt
Created November 27, 2018 18:27
JQ WaPo examples
# Count the number of content elements in a WaPo json line object - Debug mode
jq '{id: .id, items: [.contents[] | select(.type == "pull_quote")]} | select(.items | length > 0) | length' TREC_Washington_Post_collection.v2.jl | wc -l
# More compact
jq '[.contents[] | select(.type == "tweet")] | length > 0' TREC_Washington_Post_collection.v2.jl | grep true | wc -l