Skip to content

Instantly share code, notes, and snippets.

@miguelmota
miguelmota / README.md
Last active May 15, 2024 07:48
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 / 30-touchpad.conf
Created February 29, 2020 02:44
Arch linux enable tap to click on touchpad
Section "InputClass"
Identifier "touchpad"
Driver "libinput"
MatchIsTouchpad "on"
Option "Tapping" "on"
Option "TappingButtonMap" "lmr"
EndSection
@miguelmota
miguelmota / rsa_util.go
Last active May 10, 2024 20:54
Golang RSA encrypt and decrypt example
package ciphers
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"encoding/pem"
"log"
)
@miguelmota
miguelmota / README.md
Last active May 9, 2024 14:36
Arch linux google authenticator 2FA

Install google authenticator

sudo pacman -S libpam-google-authenticator
sudo pacman -S qrencode

Edit pam config

@miguelmota
miguelmota / auth.json
Created February 21, 2019 03:08
AWS Cognito Identity authenticate using cURL
{
"AuthParameters" : {
"USERNAME" : "alice@example.com",
"PASSWORD" : "mysecret"
},
"AuthFlow" : "USER_PASSWORD_AUTH",
"ClientId" : "9..............."
}
@miguelmota
miguelmota / i3-cheat-sheet.md
Last active May 3, 2024 21:16 — forked from JeffPaine/i3-cheat-sheet.md
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (window/command or alt by default depending on config)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@miguelmota
miguelmota / proxy_mitm_example.js
Last active May 3, 2024 03:56
Node.js proxy mitm log example
// run: mitmproxy -p 8080
// run: node proxy.js
async function setupProxy (proxyUrl) {
// require('global-agent/bootstrap')
// process.env.GLOBAL_AGENT_HTTP_PROXY = proxyUrl
// process.env.GLOBAL_AGENT_HTTPS_PROXY = proxyUrl
// console.log('Global proxy routing set up.')
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' // Ignore self-signed certs, use with caution
@miguelmota
miguelmota / external_link_arrow.txt
Last active April 30, 2024 15:17
Unicode UTF-8 external link arrow symbol (closest thing to it)
@miguelmota
miguelmota / bootable_usb.sh
Last active April 29, 2024 09:22
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 / config
Last active April 29, 2024 04:57
Arch linux VNC server setup
session=lxqt
geometry=1920x1080
localhost # comment this out to allow connections from anywhere
alwaysshared