Skip to content

Instantly share code, notes, and snippets.

View tonejito's full-sized avatar
🐰
= ^ . ^ =

Andres Hernandez tonejito

🐰
= ^ . ^ =
View GitHub Profile
@tonejito
tonejito / markdown-table-image.md
Last active August 15, 2026 18:11
Markdown table container for images
|                                       |
|:-------------------------------------:|
| ![](https://goo.gl/1R3T6h "Tonejito") |
@tonejito
tonejito / sudoers-insults
Last active February 1, 2025 00:36
sudoers.d insults configuration file
# = ^ . ^ =
#
# /etc/sudoers.d/sudoers-insults
# sudoers.d insults configuration file
# Andres Hernandez - tonejito
#
# This file must be mode 0440 and owner root:root
# install --mode 0440 --owner root --group root sudoers-insults /etc/sudoers.d/
#
# Edit with visudo
@tonejito
tonejito / httpd-debug.sh
Created March 5, 2014 06:51
Run apache in DEBUG mode with logging to stdout and optional trace of opened files
#!/bin/bash -vx
# httpd-debug.sh
# Run apache in DEBUG mode with logging to stdout and trace of opened files
# Andres Hernandez - tonejito -
STRACE=`which strace`
APACHE_DEBUG="/usr/sbin/apache2 -X -e debug"
@tonejito
tonejito / Makefile
Created January 17, 2019 18:04
Download and install Noto Emoji font in Debian GNU/Linux with Gnome Desktop
SHELL=/bin/bash
DOWNLOADS=~/Downloads
NOTO_URL=https://noto-website-2.storage.googleapis.com/pkgs/Noto-hinted.zip
NOTO_ZIP=noto-font.zip
NOTO_DIR=/usr/share/fonts/opentype/noto
all: download install
download:
@tonejito
tonejito / sources.list
Last active November 1, 2023 23:02
sources.list
# /etc/apt/sources.list
# apt-key adv --keyserver keyring.debian.org --recv-keys XXXXXXXXXXXXXXXX
# apt-key list | grep -i expired | cut -d / -f 2 | awk '{print $1}' | xargs -r -t apt-key adv --keyserver keys.gnupg.net --recv-keys
# aptitude update
For older releases
# cat > /etc/apt/apt.conf.d/99-gpg-EXPIRED << EOF
// http://snapshot.debian.org/

Iniciar servicio PostgreSQL con un contenedor en utility

Iniciar sesion en utility.

[student@workstation ~]$ ssh lab@utility
[lab@utility ~]$
@tonejito
tonejito / .gitignore
Last active June 2, 2023 01:59
Harry Potter and the cursed ARO k8s volume mounts
# .gitignore
**/old
@tonejito
tonejito / oops-panic.grub.cfg
Last active January 6, 2023 15:04
Linux kernel verbose boot and logging to serial console
# Linux kernel verbose boot and logging to serial console
#
# Check Documentation/kernel-parameters.txt [1] to check all aplicable options for your kernel version
#
# VERSION="v"$(uname -r | sed -e 's/\(\.0\)\?-.*$//')
# [1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/plain/Documentation/kernel-parameters.txt?id=refs/tags/$VERSION
linux /vmlinuz root=/dev/sda1 ro consoleblank=0 earlyprintk=ttyS0 console=ttyS0 panic=1 oops=panic panic_on_warn verbose INIT_VERBOSE=yes init=/sbin/init -v
initrd /initrd.gz
boot
@tonejito
tonejito / Rename-Computer.ps1
Created August 12, 2016 17:23
Rename Windows PC via PowerShell and WMI
# Rename Windows PC via PowerShell and WMI
# http://social.technet.microsoft.com/wiki/contents/articles/7824.set-computer-name-using-powershell.aspx
# https://technet.microsoft.com/en-us/library/hh849792(v=wps.620).aspx
$ComputerName = Get-WmiObject Win32_ComputerSystem
$ComputerName.Rename($name)
Restart-Computer
@tonejito
tonejito / nslookup2etc-hosts.sh
Created October 21, 2014 00:19
Scan a network segment via nslookup and convert output to /etc/hosts format
#!/bin/bash
(
for ip in {1..254} ;
do
nslookup 1.2.3.$ip ;
done
) | \
grep 'name\ =\ ' | \
sed -e 's/\([[:digit:]]\+\)\.\([[:digit:]]\+\)\.\([[:digit:]]\+\)\.\([[:digit:]]\+\)\..*=\ \(.*\).$/\4.\3.\2.\1\t\5/g' | \