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 / scrum_questions.md
Last active April 19, 2024 14:21
SCRUM Certifications 130 Q&A!
@n0nuser
n0nuser / Dockerfile
Last active February 29, 2024 11:33
Node 18 in a Dockerfile
# NodeJS Preparation
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
# Install runtime dependencies
RUN apt-get update && \
apt-get install -y nodejs npm && \
rm -rf /var/lib/apt/lists/*
# Install packages
RUN npm install @stoplight/spectral-cli @stoplight/spectral-core
@n0nuser
n0nuser / extensions.md
Last active April 22, 2024 14:21
VSCode Python Backend Extensions
@n0nuser
n0nuser / functions.py
Last active November 1, 2023 20:03
Python Function Performance Profiler - Should work as is!
from profiler import profile_functions
def romanToIntPablo2022(s: str) -> int:
roman = {"I": 1, "V": 5, "X": 10, "L": 50, "C": 100, "D": 500, "M": 1000}
roman_sum = 0
for index, letter in enumerate(s):
try:
if roman[letter] < roman[s[index + 1]]:
roman_sum -= roman[letter]
@n0nuser
n0nuser / README.md
Last active September 22, 2023 12:58
Kali Linux Env. Install Script

Kali Linux Environment - Install Script

Look inside the Gist to find the install script!

I made this script 2 years ago, so I guess the version of Kali Linux back then was the 2021.4 version.

Take the package installation with a grain of salt and adapt it to your needs.

Cheers!

@n0nuser
n0nuser / sync_dirs.cmd
Last active October 30, 2023 12:50
Sync Directories with Rsync in Windows
REM ADAPT TO YOUR LIKING
REM Change Drive if needed
F:
REM Change to parent folder of the one to be synced
cd "F:\Documents\"
REM Have installed WSL in order to launch bash
bash -c "rsync -avzh -P --stats MyFolder/ 'user@192.168.1.20:/mnt/hdd/MyFolder'"
REM If another port is used
bash -c "rsync -avzh -P --stats --ignore-errors -e 'ssh -p 2222' MyFolder/ 'user@192.168.1.20:/mnt/hdd/MyFolder'"
@n0nuser
n0nuser / manual-of-me-questions.md
Last active December 5, 2022 10:43
Manual of Me Questions

Manual of Me - Questions

Profesional

Job related

  • The times/hours I like to work / Structure of my day
  • An ideal day at work looks like...
  • I do my best work when...
  • How I view success
@n0nuser
n0nuser / executeQuery.py
Last active November 28, 2022 13:51
Execute query in files from a folder into a MS SQL Server continuosly
#!/usr/bin/python3
###############################################################################################
# Author: n0nuser - Pablo Jesús González Rubio - https://nonuser.es - gonzrubio.pablo@gmail.com
###############################################################################################
#
# Traverses files in a folder, executing the query in each file to a MS SQL Server
#
# If it succeeds, the file could be deleted
#
# If there's any error with a file (execution of query or not able to read file),
@n0nuser
n0nuser / main.py
Last active February 23, 2022 17:19
Python functions
def randomPassword(length):
"""
pass = randomPassword(16)
Ref: https://stackoverflow.com/a/2257449
"""
return(''.join(random.SystemRandom().choice(string.ascii_uppercase + string.digits) for _ in range(length)))
def _get_size(bytes: int, suffix="B"):
"""Scale bytes to its proper format.
e.g: