Skip to content

Instantly share code, notes, and snippets.

@miguelmota
miguelmota / bootable_usb.sh
Last active March 9, 2026 04:43
Linux copy img.xz to usb drive (bootable drive) using xzcat and dd
lsblk
sudo umount /dev/sd<?><?>
xzcat ~/Downloads/linux.img.xz | sudo dd of=/dev/sd<?> conv=fdatasync status=progress
@miguelmota
miguelmota / install_wifi_drrivers.sh
Created January 3, 2020 01:04
Linux Fedora install Macbook Pro broadcom wifi drivers
sudo dnf install -y http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install -y akmods "kernel-devel-uname-r == $(uname -r)"
sudo dnf install -y broadcom-wl
sudo akmods
sudo reboot
@miguelmota
miguelmota / install_lightdm.sh
Created August 8, 2021 04:59
Arch linux install lightdm (Light Display Manager)
sudo pacman -S lightdm
sudo pacman -S lightdm-gtk-greeter
sudo systemctl enable lightdm
sudo systemctl start lightdm
@miguelmota
miguelmota / ip.go
Last active February 28, 2026 15:51
Golang get IP address from web HTTP request handler
package main
import (
"errors"
"log"
"net"
"net/http"
"strings"
)
@miguelmota
miguelmota / rss_urls.txt
Last active February 27, 2026 23:18
Cryptocurrency news RSS feeds
https://thedefiant.io/feed/
https://www.coindesk.com/arc/outboundfeeds/rss/?outputType=xml
https://cointelegraph.com/rss
https://cryptopotato.com/feed/
https://cryptoslate.com/feed/
https://cryptonews.com/news/feed/
https://smartliquidity.info/feed/
https://finance.yahoo.com/news/rssindex
https://www.cnbc.com/id/10000664/device/rss/rss.html
https://time.com/nextadvisor/feed/
@miguelmota
miguelmota / external_link_arrow.txt
Last active February 24, 2026 09:54
Unicode UTF-8 external link arrow symbol (closest thing to it)
@miguelmota
miguelmota / gif.sh
Last active February 23, 2026 11:24
Convert a .MOV to an animated .GIF using FFMPEG and Gifsicle.
#!/bin/bash
# Convert a .MOV to an animated .GIF using FFMPEG and Gifsicle.
# Credit: https://gist.github.com/dergachev/4627207
#
# Dependencies:
# ffmpeg
# gifsicle
#
# Example:
@miguelmota
miguelmota / README.md
Last active February 21, 2026 14:10
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@miguelmota
miguelmota / pino_trace_caller.js
Created November 26, 2019 02:05
Node.js pino logger show caller filename and line number
import path from 'path'
import pino from 'pino'
const STACKTRACE_OFFSET = 2
const LINE_OFFSET = 7
const { symbols : { asJsonSym} } = pino
function traceCaller (pinoInstance) {
const get = (target, name) => name === asJsonSym ? asJson : target[name]
@miguelmota
miguelmota / vncviewer.sh
Created December 5, 2020 12:43
Arch linux install vnc viewer
yay -S realvnc-vnc-viewer