Skip to content

Instantly share code, notes, and snippets.

View theagoliveira's full-sized avatar

Thiago Cavalcante theagoliveira

View GitHub Profile
@theagoliveira
theagoliveira / .old-stuff
Last active July 7, 2021 00:36
Old/outdated code
We couldn’t find that file to show.
@theagoliveira
theagoliveira / ffmpeg_split.sh
Last active March 5, 2020 01:57
Split multiple video files using ffmpeg
#!/bin/bash
#
# Author: Thiago Cavalcante
# github.com/theagoliveira
dry=false
list_flag=false
while getopts ":l:d" opt; do
case ${opt} in
@theagoliveira
theagoliveira / OSTEP.sh
Last active May 6, 2021 06:53
Download every OSTEP (Operating Systems: Three Easy Pieces) chapter
#!/bin/bash
#
# Author: Thiago Cavalcante
# github.com/theagoliveira
url="http://pages.cs.wisc.edu/~remzi/OSTEP/"
mkdir OSTEP
cd OSTEP
wget -O "00a Preface.pdf" "${url}preface.pdf"
@theagoliveira
theagoliveira / spotify-album-export.sh
Last active April 16, 2022 22:18
Export a list with Spotify saved albums
#!/bin/bash
# _
# ___ _ __ ___ _ __ ___ __| |
# / __| '_ \ / __| '_ ` _ \ / _` |
# \__ | |_) | (__| | | | | | (_| |
# |___| .__/ \___|_| |_| |_|\__,_|
# |_|
# Created by: spcmd
# http://spcmd.github.io
# https://github.com/spcmd
@theagoliveira
theagoliveira / png_add_iend.py
Created October 11, 2019 04:59
Add a IEND chunk to a png file or to every png file in a directory
#!/usr/bin/env python
"""
TODO
"""
import argparse
import os
__author__ = 'Thiago Cavalcante'
@theagoliveira
theagoliveira / download_pedro_medeiros_tutorials.sh
Created October 11, 2019 05:55
Download every tutorial from Pedro Medeiros (Towerfall, Celeste) -- outdated
#!/bin/bash
#
# Author: Thiago Cavalcante
# github.com/theagoliveira
#
# Pedro's patreon: https://www.patreon.com/saint11
imgur_url="https://i.imgur.com"
tumblr_url="https://66.media.tumblr.com"
@theagoliveira
theagoliveira / rar_to_zip.sh
Created October 11, 2019 05:56
Extract every rar file inside a directory and compress as a zip file
#!/bin/bash
#
# Author: Thiago Cavalcante
# github.com/theagoliveira
find . -maxdepth 5 -mindepth 1 -name "*.rar" -type f -execdir unrar x -ad {} \; -exec bash -c 'f="{}"; f=${f::-4}; 7z a -tzip "$f.zip" "$f"; rm -rf "$f"' \; -exec rm -f {} \;
@theagoliveira
theagoliveira / get_installed_programs.ps1
Created October 11, 2019 06:20
PowerShell one-liner to save a list of the installed programs in Windows
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table -AutoSize > $pwd\installed_programs_$(Get-Date -Format "yyyy-MM-dd").txt
@theagoliveira
theagoliveira / cm_price.py
Created October 17, 2019 03:03
Get the price of a product from Cissa Magazine website
#!/usr/bin/env python
"""
Get the price of a product from Cissa Magazine website.
"""
import argparse
import re
import urllib.request as req
@theagoliveira
theagoliveira / ml_price.py
Created October 17, 2019 03:03
Get the price of the first result from a MercadoLivre website search
#!/usr/bin/env python
"""
Get the price of the first result from a MercadoLivre website search.
"""
import argparse
import re
import urllib.request as req