-
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
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 |
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.
wget -O - http://debian.drdteam.org/drdteam.gpg | sudo apt-key add -
I regularly have directories of files I want to back up in case of disaster. Usually these are files that change often, and I only want to keep recent versions in case I want to revert or recover changes. (Git? git, who?)
I have used this script over and over as a simple way to archive a directory to a location with a date-stamped filename. It also cleans up after itself by deleting files older than X days. I stick it in CRON and let it run on a schedule and I always have an archive of the last X days of the files in my directory.
#!/usr/bin/env bash
#===============================================================================
#
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
" Vim mapping to insert the day and date as a header for notes, journals etc | |
function! InsertFormattedDate() | |
let day = strftime("%d") | |
let suffix = "th" | |
if day =~# "^02\\\|2\\\|22$" | |
let suffix = "nd" | |
elseif day =~# "^01\\\|1\\\|21\\\|31$" | |
let suffix = "st" | |
elseif day =~# "^03\\\|3\\\|23$" | |
let suffix = "rd" |
" --------------------------------------------------------------------------------------------------------------------- | |
" ==> .vimrc | |
" --------------------------------------------------------------------------------------------------------------------- | |
" ==> Some settings from Vim Zero: https://www.oliversherouse.com/posts/vim_zero.html | |
" | |
syntax enable | |
filetype plugin on | |
" General |
" --------------------------------------------------------------------------------------------------------------------- | |
" ==> .vimrc | |
" --------------------------------------------------------------------------------------------------------------------- | |
" ==> Some settings from Vim Zero: https://www.oliversherouse.com/posts/vim_zero.html | |
" | |
syntax enable | |
filetype plugin on | |
" General |