Skip to content

Instantly share code, notes, and snippets.

View n0nuser's full-sized avatar
👽

Pablo González Rubio n0nuser

👽
View GitHub Profile
@n0nuser
n0nuser / arch_install.md
Last active January 22, 2022 17:04
My Arch Install

Arch Linux Installation - EFI

Pre-Installation

Loading keyboard

loadkeys es
@n0nuser
n0nuser / .bash_aliases
Last active August 31, 2021 11:18
My Bash aliases
alias aliases="source ~/.bash_aliases"
# OS
alias poweroff="halt -p"
# Reboot and forever with No Gui
alias rebootNoGui='sudo systemctl set-default multi-user && sudo reboot'
# Reboot and forever with Gui
@n0nuser
n0nuser / aes.py
Created August 27, 2021 08:13
Encryption with Python
from Crypto.Cipher import AES # Use cryptodome!!
import base64
BS = 16
pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS).encode()
unpad = lambda s: s[:-ord(s[len(s)-1:])]
def iv():
return chr(0) * 16
@n0nuser
n0nuser / rc.lua
Created April 13, 2021 23:26
Arch Awesome
awful.keyboard.append_global_keybindings({
-- Volume Control
-- https://bbs.archlinux.org/viewtopic.php?pid=958820#p958820
awful.key({ }, "XF86AudioPlay", function () awful.util.spawn("mpc toggle") end),
awful.key({ }, "XF86AudioNext", function () awful.util.spawn("mpc next") end),
awful.key({ }, "XF86AudioPrev", function () awful.util.spawn("mpc prev") end),
awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer -c 0 set Master 1dB+") end),
awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer -c 0 set Master 1dB-") end),
awful.key({ }, "XF86AudioMute", function () awful.util.spawn("amixer -c 0 set Master toggle") end),
})
@n0nuser
n0nuser / config.toml
Last active April 12, 2021 10:40
Using Google Analytics 4 with GoHugo
# Page settings
baseURL = "baseurl"
languageCode = "en"
title = "Hey! I'm using GA4"
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
@n0nuser
n0nuser / Networking.py
Last active March 19, 2021 08:39
Networking related Python Functions
import re
import socket
import struct
import platform
import subprocess
# https://stackoverflow.com/a/166589
def getWANIP():
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))