Skip to content

Instantly share code, notes, and snippets.


Miguel Mota miguelmota

Block or report user

Report or block miguelmota

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
miguelmota / reading_time.html
Created Mar 29, 2020
Hugo display reading time minutes like medium blogs
View reading_time.html
{{ math.Round (div (countwords .Content) 220.0) }} min read
miguelmota / pacman.conf
Created Mar 29, 2020
Arch linux ignore package (ie linux kernel) from updating in config file (/etc/pacman.conf)
View pacman.conf
IgnorePkg = linux linux-headers linux-api-headers
miguelmota / twitter_friends_list.js
Created Mar 28, 2020
Node.js create list based on people following using twurl cli
View twitter_friends_list.js
const { exec } = require('child_process')
const _ = require('lodash')
;(async () => {
const listId = '<LIST_ID>'
const username = '<USERNAME>'
const friends = await new Promise((resolve) => {
const cmd = `twurl /1.1/friends/ids.json?screen_name=${username}`
exec(cmd, (err, stdout, stderr) => {
miguelmota / icons
Last active Mar 28, 2020
Browser icons (Firefox, Safari, Chrome, Opera, Brave, Edge)
View icons
icons below
miguelmota /
Created Mar 27, 2020
Arch linux install wireguard
sudo pacman -S wireguard-tools wireguard-arch
miguelmota /
Last active Mar 27, 2020
Linux Ubuntu install wireguard
sudo apt-get install linux-headers-$(uname --kernel-release)
sudo add-apt-repository ppa:wireguard/wireguard
sudo apt-get update
sudo apt-get install wireguard
sudo modprobe wireguard
wg # should output nothing if successful
miguelmota /
Last active Mar 29, 2020
Linux wireguard setup server and client
# arch install:
sudo -s -H
mkdir -p /etc/wireguard/keys
cd /etc/wireguard/keys
umask 077
wg genkey | tee privatekey | wg pubkey > publickey
vim /etc/wireguard/wg0.conf
wg-quick up wg0
miguelmota /
Last active Mar 27, 2020
Linux Ubuntu sudo mode root
miguelmota /
Last active Mar 27, 2020
Linux mount usb drive for samba
$ sudo blkid
[sudo] password for mota:
/dev/nvme0n1p1: UUID="6f43daa0-e9b4-4e5d-b33f-4ea5fbf6e060" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="ef1f993f-19a4-254a-8c4a-b01ec618b797"
/dev/nvme0n1p2: UUID="4300f7ca-195d-4cce-82c3-104c17eaba15" TYPE="swap" PARTUUID="c3d247f3-26d7-ab41-b6cf-d0b62b9c7b44"
/dev/nvme0n1p3: UUID="4A10-36AA" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="a8705bd4-a629-f148-98fa-bdee82d2b8c5"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
miguelmota /
Created Mar 26, 2020
Linux reload fstab (/etc/fstab)
You can’t perform that action at this time.