This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 0755 root:root /usr/sbin/update-grub | |
# update-grub is not provided on RHEL-ish distros | |
set -e | |
exec grub2-mkconfig -o /boot/grub2/grub.cfg "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
# = ^ . ^ = | |
DATE=/bin/date | |
TIMESPEC=seconds | |
${DATE} | |
${DATE} --rfc-2822 | |
${DATE} --iso-8601=${TIMESPEC} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -vx | |
# = ^ . ^ = | |
# https://gist.github.com/tonejito/540ace6adeb3c01880375689801200f9 | |
# Clean all the old repo data | |
aptitude clean && find /var/lib/apt/lists/ -type f -print0 | xargs -0 rm | |
# Update repository data and check for system updates | |
aptitude update | egrep -v '://' && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec echo 'hell yeah!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# = ^ . ^ = | |
# https://gist.github.com/tonejito/9ae6fc6265a94c41d8bfa1e6e89b3e98 | |
KEY=id_rsa | |
MAIL=${USER}@$(hostname -f) | |
umask 0077 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# none, javascript, references | |
OBFUSCATION=references | |
echo '<[email protected]>' | pandoc --email-obfuscation ${OBFUSCATION} -f Markdown -t html5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# = ^ . ^ = | |
# 0700 root:root clean-journald-logs | |
# Delete the journald logs from /var/log/journal from the last years | |
# | |
# Its best to run this via ionice(1) | |
# ionice -c 3 clean-journald-logs | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# = ^ . ^ = | |
# show_tech-support.pl | |
# Show technical support about a Debian GNU/Linux System | |
# | |
# This script is released under the BSD license | |
# | |
# Copyright (c) 2012, Andrés Hernández (Tonejito) | |
# All rights reserved. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://superuser.com/a/398470 | |
# https://superuser.com/a/1188867 | |
GETFACL=/usr/bin/getfacl | |
GETCAP=/sbin/getcap | |
PATH_DIRS=$(echo $PATH | tr ':' ' ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# filter-htdocs-files | |
# Filter out valid htdocs files to expose (old and backup) files with odd names | |
# | |
# Output files: | |
# ~/htdocs.files: List of all files found in this script | |
# ~/htdocs.urls: List of all URLs where the found files can be accessed | |
# | |
# This file can also be passed to wget to check automagically the urls like so: |