Skip to content

Instantly share code, notes, and snippets.

[Desktop Entry]
Encoding=UTF-8
Name=Nuke
Comment=Destroy data permanently
Exec=xfce4-terminal --command /home/xubuntu/wipe.sh
Terminal=true
Type=Application
@UniversalSuperBox
UniversalSuperBox / wipe.sh
Last active January 27, 2021 01:54
Script to wipe all of the SATA storage media in a computer
#!/bin/bash
# Script to wipe all of the SATA storage media in a computer
# Absolutely, positively, do not run this script unless you want all of your data
# to be gone.
# Copyright 2019 Dalton Durst
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@UniversalSuperBox
UniversalSuperBox / Unattended-security-upgrades-rhel-7.md
Last active August 6, 2024 09:34
Automatic security update and reboot of RHEL 7 servers

On Ubuntu, it's stupidly easy to enable automatic security updates. If you didn't do it in the installer:

sudo apt install unattended-upgrades
sudo dpkg-reconfigure unattended-upgrades

You can also make the server reboot automatically at a scheduled time by setting the following settings in /etc/apt/apt.conf.d/50unattended-upgrades:

@UniversalSuperBox
UniversalSuperBox / small-calendar.qml
Created April 30, 2018 15:31
A test of the QML Calendar
import QtQuick 2.6
import QtQuick.Controls 1.4
Rectangle {
id: root;
Calendar {
}
}
@UniversalSuperBox
UniversalSuperBox / standalonedaynametest.qml
Last active April 30, 2018 15:22
Test of standaloneDayName giving incorrect values
import QtQuick 2.6
import QtQuick.Controls 1.4
Rectangle {
id: root;
Label {
font.pointSize: 32;
anchors.horizontalCenter: parent.horizontalCenter;
text: Qt.locale().name + ":" + Qt.locale(Qt.locale().name).standaloneDayName((0), Locale.ShortFormat);
@UniversalSuperBox
UniversalSuperBox / cause-panic.conf
Created March 9, 2018 22:01
Upstart job to cause a kernel panic accidentally on purpose
start on startup
script
sleep 30
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger
end script
@UniversalSuperBox
UniversalSuperBox / pre-start.sh
Last active June 19, 2018 19:51
Halium Android pre-start.sh replacement for halium-boot
#!/bin/sh
for mountpoint in /android/*; do
mount_name=`basename $mountpoint`
desired_mount=$LXC_ROOTFS_PATH/$mount_name
# Remove symlinks, for example bullhead has /vendor -> /system/vendor
[ -L $desired_mount ] && rm $desired_mount
[ -d $desired_mount ] || mkdir $desired_mount