Skip to content

Instantly share code, notes, and snippets.


Miguel Mota miguelmota

View GitHub Profile
miguelmota / uni_checker.js
Last active Sep 21, 2020
UNI token claim checker
View uni_checker.js
const fs = require('fs')
const fetch = require('node-fetch')
const BN = require('bignumber.js')
async function makeRequest (address) {
const url = `${address}`
const res = await fetch(url)
const json = await res.json()
return json
miguelmota / clipboard.js
Created Sep 18, 2020
JavaScript copy to clipboard example using document.execCommand
View clipboard.js
const tmp = document.createElement('input')
tmp.value = 'hello world'
miguelmota /
Created Sep 13, 2020
Fix for "WARNING: '/usr/lib/perl5/5.30' contains data from at least 3 packages which will NOT be used by the installed perl interpreter."
yay -S --asdeps $(pacman -Qqo '/usr/lib/perl5/5.30')
miguelmota /
Last active Sep 14, 2020
Fire TV Stick 4K use USB drive as storage
# install adb shell apk using downloader
# open adb shell
# list usb drivers and their ids
$ sm list-disks
# partiion all of usb to be used as internal storage
$ sm partition disk:8,0 private
miguelmota / instructions.txt
Last active Sep 14, 2020
Install Termux on Fire TV Stick
View instructions.txt
- Add F-Droid repository via Downloader app
- Install termux app
miguelmota /
Created Sep 5, 2020
Linux mount USB drive
udisksctl mount -b /dev/sdb1
miguelmota / post-merge
Last active Sep 5, 2020
Git post-merge hook to auto-build packages on git pull
View post-merge
# Auto-build packages that were modified after a git pull
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep -q "$1" && eval "$2"
miguelmota / index.js
Last active Sep 2, 2020
NPM install multiple versions of same package example (ethers)
View index.js
import * as ethers from 'ethers' // v4
import * as ethers5 from 'ethers5' // v5
miguelmota / vim_spell_check.txt
Last active Aug 31, 2020
Vim spell check notes
View vim_spell_check.txt
see tutorial `:help spell`
turn on `:setlocal spell`
turn on, specific language `:setlocal spell spelllang=en_us`
turn off `:setlocal nospell`
next word `]s`
prev word `[s`
hover over word `z=` to see suggestions
add good word `zg`
add wrong word `zw`
undo good word `zug`
miguelmota /
Last active Aug 31, 2020
Arch linux spell check command
# install english dictionary words
sudo pacman -S aspell-en
# spellcheck file
aspell -c file.txt
You can’t perform that action at this time.