This file contains hidden or 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
const moment = require('moment-timezone') | |
const logger = require('tracer').colorConsole() | |
const { RRule, RRuleSet, rrulestr } = require('rrule') | |
function untilStringToDate(until) { | |
const re = /^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/ | |
const bits = re.exec(until) | |
if (!bits) throw new Error(`Invalid UNTIL value: ${until}`) |
This file contains hidden or 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 | |
# Pass directory to sync to SD card as parameter 1 | |
# Mounts & syncs any directory in current directory | |
# to an SD card that is named the same as the directory. | |
# Also sets special file settings on the SD card so that | |
# MIST displays them correctly. | |
if [ $USER != root ]; then | |
echo "Must be run as root!" | |
exit 1 |