Skip to content

Instantly share code, notes, and snippets.

:octocat:
Coding

Miguel Mota miguelmota

:octocat:
Coding
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
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
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
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
miguelmota / icons
Last active Mar 28, 2020
Browser icons (Firefox, Safari, Chrome, Opera, Brave, Edge)
View icons
icons below
@miguelmota
miguelmota / install_wireguard.sh
Created Mar 27, 2020
Arch linux install wireguard
View install_wireguard.sh
sudo pacman -S wireguard-tools wireguard-arch
@miguelmota
miguelmota / install_wireguard.sh
Last active Mar 27, 2020
Linux Ubuntu install wireguard
View install_wireguard.sh
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
miguelmota / client.sh
Last active Mar 29, 2020
Linux wireguard setup server and client
View client.sh
# arch install: https://gist.github.com/miguelmota/0515421a743ac705d40a40ae6d2f1042
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
miguelmota / sudo_mode.sh
Last active Mar 27, 2020
Linux Ubuntu sudo mode root
@miguelmota
miguelmota / mount_usb.sh
Last active Mar 27, 2020
Linux mount usb drive for samba
View mount_usb.sh
$ 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"
/dev/sdb1: LABEL_FATBOOT="USBDRIVE" LABEL="USBDRIVE" UUID="C5C8-2A7D" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="d11f3b92-01"
@miguelmota
miguelmota / reload_fstab.sh
Created Mar 26, 2020
Linux reload fstab (/etc/fstab)
You can’t perform that action at this time.