Skip to content

Instantly share code, notes, and snippets.

@gtpedrosa
gtpedrosa / whisper-audio-to-text.py
Created January 26, 2023 23:46 — forked from rasbt/whisper-audio-to-text.py
Transcribes audio files using OpenAI Whisper
# Setup:
# conda create -n whisper python=3.9
# conda activate whisper
# https://github.com/openai/whisper
# pip install git+https://github.com/openai/whisper.git
# Usage:
# python whisper-audio-to-text.py --audio_dir my_files --out_dir texts
import argparse
@gtpedrosa
gtpedrosa / fix-intel_wifi_aer-avell_g1513_fire_v3
Created March 7, 2022 00:32 — forked from Brainiarc7/ fix-intel_wifi_aer-avell_g1513_fire_v3
Temporary fix for AER's excessive `severity=Corrected` logging for Intel Wireless (Avell G1513 Fire V3) (Arch Linux)
silly gist hack, why do we need you? :(
@gtpedrosa
gtpedrosa / scanner.sh
Created April 4, 2020 02:40 — forked from andyrbell/scanner.sh
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
pandoc mydoc.tex -o mydoc.docx
dmesg | grep SATA
# https://stackoverflow.com/questions/8480073/how-would-i-get-the-current-mouse-coordinates-in-bash
watch -t -n 0.0001 xdotool getmouselocation
@gtpedrosa
gtpedrosa / bibkeytocomment.sh
Created February 26, 2018 10:02
export_bibkey_to_comments
grep "@ARTICLE{" artigo-qualidade.bib | sed 's/,//' | sed 's/@ARTICLE{//' | sed 's/^/%%/'
@gtpedrosa
gtpedrosa / gist:3a527f97d2bdaa5bedab4ec818e771b5
Created February 25, 2018 20:37
search_in_pdfs_within_folder
pdfgrep -R 'pattern' /some/folder
@gtpedrosa
gtpedrosa / drop_shadow
Last active April 5, 2017 12:40 — forked from chrisn/drop_shadow
Add a drop shadow to an image, using ImageMagick #imageMagick
# Credits: <lookup which forum i got this from>
convert <input-file> \( +clone -background black -shadow 30x8+0+0 \) +swap -background none -layers merge +repage <output-file>
@gtpedrosa
gtpedrosa / batch_epub_to_mobi_convert
Last active April 5, 2017 12:26
Batch convert epub to mobi using calibre ebook-convert
# Credits: https://ubuntuforums.org/showthread.php?t=2085148
for book in *.epub; do echo "Converting $book"; ebook-convert "$book" "$(basename "$book" .epub).mobi"; done