find / -iname "*.log" > /root/scripts/logs.txt
root/scripts/truncate-logs.sh:
#!/bin/bash
FILENAME="/root/scripts/logs.txt"
LINES=$(cat $FILENAME)
for LINE in $LINES
do
# Obtain the latest Void Linux base live ISO from: | |
# https://voidlinux.org/download/ (plain musl version) | |
# Write it to a USB drive: | |
# sudo dd bs=4M if=void-live-x86_64-musl-20181111.iso of=/dev/sdb status=progress oflag=sync | |
# Switch to bash (easier to use while installing) | |
bash | |
# Set UK keymap |
## This is the basics on how to install weechat and (optionally) weechat-matrix and/or bitlbee on Arch Linux | |
# This does not explain how to set up anything beyond that! | |
# Refer to https://gist.github.com/unendingPattern/26558dfbfd9417157f20b7c236f28f05 (weechat) | |
# and https://www.bitlbee.org/user-guide.html#quickstart (bitlbee) | |
# and https://github.com/poljar/weechat-matrix#configuration (weechat-matrix) | |
# for further information. | |
## Not using Arch Linux on your main system? Running a server with LXD containers? | |
# Create and launch a shell into an Arch Linux LXD container: |
sudo dnf -y groupinstall "Development Tools" | |
mkdir /src | |
cd /src | |
#redir | |
git clone https://github.com/troglobit/redir.git | |
cd redir | |
./autogen.sh | |
./configure | |
make -j5 |
function dd () { | |
local bold=$(tput bold) | |
local normal=$(tput sgr0) | |
local red=$(tput setaf 1) | |
local green=$(tput setaf 2) | |
local yellow=$(tput setaf 3) | |
local ddcommand=$(which dd) | |
local vars="" |
#!/bin/bash | |
# Encrypt existing hard drive in place. | |
# Requires a second physical drive to temporarily store data. This drive will be erased. | |
# This script is meant to be run on Clonezilla 1.2.9-19 or later. | |
# The cryptsetup syntax is different in Clonezilla than in Red Hat. | |
# --- Variables --- # |
# element-web auto-updater script by unendingPattern ( unendingpattern.github.io ) | |
# fetches the latest element (matrix client) release for self-hosting | |
# requirements: curl, jq, tar | |
# cron: | |
# @hourly /bin/sh /path/to/get-latest-element.sh | |
# OR | |
# 0 * * * * /bin/sh /path/to/get-latest-element.sh | |
# functions |
#!/bin/bash | |
#set -x | |
# configuration | |
hostname=$(hostname) | |
lxc="/snap/bin/lxc" | |
path="/mount/backups/$hostname/" | |
path_host=$path"host/" |
find / -iname "*.log" > /root/scripts/logs.txt
root/scripts/truncate-logs.sh:
#!/bin/bash
FILENAME="/root/scripts/logs.txt"
LINES=$(cat $FILENAME)
for LINE in $LINES
do
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/python | |
from twisted.words.protocols import irc | |
from twisted.internet import reactor, protocol | |
from re import search, IGNORECASE | |
from random import randint | |
import time | |
import os, signal | |
serv_ip = "10.3.0.50" | |
serv_port = 6667 |