Skip to content

Instantly share code, notes, and snippets.

View chawl3y's full-sized avatar

Charles Hawley chawl3y

  • Cleveland, Ohio
View GitHub Profile
@chawl3y
chawl3y / apache-restart.md
Created April 14, 2025 17:57
Apache OOM Restart

A rube-goldberg style solution for restarting Apache when it gets killed my the OOM-Killer and logging the results for further analysis

#!/usr/bin/env bash
#===============================================================================
#
#          FILE: apache-restart.sh
#         USAGE:
#   DESCRIPTION: Watches syslog for OOM message, restarts Apache if killed
#         NOTES: The downside to this script is that it'll fire for the entire
@chawl3y
chawl3y / mempigs.md
Created April 25, 2023 01:02
Find top memory users on Linux

top memory users (mempigs)

ps aux  | awk '{print $6/1024 " MB\t\t" $11 " " $12}'  | sort -n | tail -10

Alias it with:

alias mempigs="ps aux | awk '{print \$6/1024 \" MB\t\t\" \$11 \" \" \$12}'  | sort -n | tail -10"
@chawl3y
chawl3y / zandronum-ubuntu.md
Created April 25, 2023 00:53
Zandronum on Ubuntu

Zandronum

Summary

Zandronum brings classic Doom into the 21st century, maintaining the essence of what has made Doom great for so many years and, at the same time, adding new features to modernize it, creating a fresh, fun new experience.

Install

wget -O - http://debian.drdteam.org/drdteam.gpg | sudo apt-key add -
@chawl3y
chawl3y / bash-challenges.md
Last active April 7, 2021 20:14
BASH Challenges

BASH Challenges


  1. Check for the presence of a directory and create it if it doesn't exist

    Example Solution

    devdir="/mnt/sqlback1/LSQLSHARE01DEV"
    if [[ ! -d "${devdir}" ]]; then
@chawl3y
chawl3y / config.yaml
Created July 21, 2018 14:34
Beets config
directory: /mnt/chawley/Music
library: /home/chawley/musiclibrary.blb
import:
# write metadata to music files
write: yes
# move imported files from source to the music directory
move: yes
copy: no