This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################### | |
# This comes in handy when you have a copy of a git repository | |
# without the .git metadata directory included, | |
# for instance a .zip export from Bitbucket. | |
# For use in a shell script. | |
############################################################### | |
if [ ! -d '.git' ]; then | |
git init . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################################ | |
# m3u2audpl.sh | |
# | |
# Creates an Audacious playlist, | |
# pre-indexed faster than Audacious does it over network mounts | |
# Supported formats: basic m3u, extended m3u. | |
# | |
# Usage: | |
# 1. Create an empty playlist in Audacious |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
####################### | |
# Setup: | |
# 1. Setup a VPN in the Synology web interface | |
# 2. Log in via SSH | |
# 3. Take a look at /usr/syno/etc/synovpnclient/openvpn/ovpnclient.conf | |
# 4. Find your VPN entry and fill in the variables below. | |
# ID = the CLIENT ID, shown between square brackets, e.g. "[o123456789]" | |
# CONFNAME = value of "conf_name" | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# flac2mp3 | |
# | |
# Recursively converts flac files to mp3s. | |
# Doesn't delete flacs after conversion but skips them on next iteration. | |
# | |
# Bits stolen from https://wiki.archlinux.org/index.php/Convert_Flac_to_Mp3#Without_FFmpeg | |
# Requires packages: lame, flac, cpulimit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################# | |
# mkm3u.sh - Bare-bones m3u generator | |
# Usage: | |
# ./mkm3u.sh | |
# Setup: | |
# 1. Supply INPATHS. Paths which are relative | |
# to this script will result in relative paths in the m3u | |
# 2. (Optional) Edit file extensions "mp3|flac|xm|s3m|mod|it" | |
################################################################# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################# | |
# mkem3u.sh - Extended m3u generator | |
# Usage: | |
# ./mkm3u.sh | |
# Setup: | |
# 1. Install dependencies: | |
# mp3info - http://ibiblio.org/mp3info/ | |
# id3tool - http://nekohako.xware.cx/id3tool/ | |
# 2. Supply INPATHS. Paths which are relative to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Quit on error | |
set -e | |
# Functions | |
msg() { | |
echo -e "\x1B[1m$1\x1B[0m" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
############################################################ | |
# For every domain on a Plesk server: | |
# | |
# - Sets a desired PHP auto_prepend_file | |
# - Patches open_basedir (if necessary) | |
# - Strips any Wordfence WAF open_basedir override (make sure your custom prepend file re-includes it!) | |
# | |
# Only tested on RedHat-like servers with Plesk Obsidian 18.0.52 | |
# Use at your own risk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Disclaimer: this was slung together as the result of some trial and error and can definitely be improved. | |
* | |
* Pass environment variable DEBUG=1 for lots of debug logging. | |
* | |
* Usage example: | |
* | |
* const rateLimits: RateLimitDef[] = [ | |
* { | |
* urlRegex: 'carriages/[^/]+/horses', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
################################################# | |
# For each site in InfiniteWP, | |
# removes all but the latest history records. | |
# | |
# This speeds up InfiniteWP and | |
# reduces the size of its tables, | |
# particularly iwp_history_raw_details. | |
# | |
# Indended to be run as a daily cronjob. |
OlderNewer