Skip to content

Instantly share code, notes, and snippets.

@kwhitefoot
kwhitefoot / move to archive
Last active January 16, 2022 13:52
Nautlis script to move selected files to an archive directory
#!/bin/bash
set -e # exit immediately on failure
set -u # fail if unset variable is used
set -o pipefail # exit with first error in a pipeline
set -x
#####################
# Move the specified files to the archive
@kwhitefoot
kwhitefoot / recordfocussedwindow.sh
Created February 23, 2018 15:10
Record active window titles to assist in writing time sheets. Should work on most Unix-like, X-windows systems.
#! /bin/bash
# Kevin Whitefoot <kwhitefoot@hotmail.com>
# 2018-02-23
#
# Record the foreground window title every 30 seconds.
# Used to help write time sheets
@kwhitefoot
kwhitefoot / update_neocities.sh
Created May 20, 2017 20:23
Update a neocities site, make the neocities copy have the same files and only the files that are on the local copy.
#!/bin/bash
# Neocities provides an API for uploading to and deleting files from
# your site.
#
# Example Usage:
# $ USERNAME=username PASS=secret_pass bash update_neocities.sh path_to_local_web_root
# or
# $ export USERNAME=username
# $ export PASS=secret_pass
@kwhitefoot
kwhitefoot / delete-not-found-neocities.sh
Created May 20, 2017 20:17
Delete files from neocities that do not exist in your local copy.
#!/bin/bash
# Neocities provides an API for deleting files from your site.
#
# Example Usage:
# $ USERNAME=username PASS=secret_pass bash delete_not_found_neocities.sh path_to_local_web_root
# or
# $ export USERNAME=username
# $ export PASS=secret_pass
# $ ./delete_not_found_neocities.sh path_to_local_web_root
@kwhitefoot
kwhitefoot / upload_neocities.sh
Last active May 20, 2017 20:08 — forked from rchrd2/upload_site.sh
Neocities Upload
#!/bin/bash
# Neocities provides an API for uploading files from ./public_html to
# your site.
#
# Example Usage:
# $ USERNAME=username PASS=secret_pass bash upload_site.sh path_to_local_web_root
# or
# $ export USERNAME=username
# $ export PASS=secret_pass