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/sh | |
# check if the positional parameters exists | |
if [ $# -ne 2 ]; then | |
echo "Please pass two parameters." | |
exit 1 | |
fi | |
FILEPATH="$1" | |
DESTINATION_PATH="$2" |
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
cloudUploader() { | |
if [ -f "$FILEPATH" ]; then | |
if aws s3 ls "$DESTINATION_PATH"/"$file_name"; then # Check if file exists on cloud | |
while true; do | |
echo "File already exists on cloud. Choose an action: (o)verwrite, (s)kip, (r)ename:" | |
read action | |
case "$action" in | |
o) | |
# Overwrite: Proceed with upload |
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
import Head from "next/head"; | |
import React, { useState } from "react"; | |
import styles from "../styles/Home.module.css"; | |
const Home = () => { | |
const [startTime, setStartTime] = useState(1633538276355); | |
const [controls, setControls] = useState(true); | |
const [ended, setEnded] = useState(false); | |
const [duration, setDuration] = useState(null); | |
const [playing, setPlaying] = useState(true); |