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 | |
# SHOUTcast auto-restart script. | |
# Copyright 2020 Charlie Britton | |
# | |
# Run this script as a cronjob, setting BASEDIR to the SHOUTcast directory and | |
# the sc_serv binary and config files below. | |
# Directory SHOUTcast is in | |
BASEDIR=$(dirname "$0") |
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/zsh | |
# (c) Copyright 2018 Charlie Britton (chza.me). All rights reserved. | |
# PLEASE NOTE: You will need ffmpeg and mp3info for this script to work properly! | |
# On MacOS, install Homebrew and then run `brew install mp3info` and `brew install ffmpeg` | |
# This script has only been tested on MacOS, there is no guarantee that it will work on any other OS (especially Windows). | |
# Set the directory to work from, this should have the child folder ./original/ with all of your music. |
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
function sumOfPrimes(number) { | |
let currentTotal = 0; | |
let mostRecentPrime = 0; | |
for(var i =1; i < number; i++) { | |
let factors = []; | |
for(var j = 1; j <= i; j++) { | |
if(i % j == 0) { factors.push(j) } | |
} | |
console.log("Factors:" + factors); | |
if(factors.length == 2) { currentTotal += i; mostrecentPrime = i } |