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 | |
PORT=3000 | |
DIRECTORYPORTPAIRS="" | |
for i in * | |
do | |
if [[ $i =~ "service-" ]]; then | |
DIRECTORYPORTPAIRS="${DIRECTORYPORTPAIRS} --directory $i --port $PORT" | |
((++PORT)) | |
fi | |
done || exit 1 |
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 | |
services=() | |
diff="$(git diff --name-status HEAD~1)" | |
for dir in * | |
do | |
if [[ $dir =~ "service-" ]] && [[ $diff =~ $dir ]]; then | |
services=(${services[@]} $dir) | |
fi | |
done |
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
<script> | |
function validateForm() { | |
var name = document.getElementById("form_name").value; | |
var email = document.getElementById("form_email").value; | |
var message = document.getElementById("form_message").value; | |
if (!(name == "" || email == "" || message == "")) { | |
alert("Sent successfully!"); | |
} else { | |
alert("Looks like you've left a field blank!\nThey are all required."); |
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
<script> | |
var seconds = 00; | |
var minutes = 00; | |
var hours = 00; | |
function count(str) { | |
str = parseInt(str); | |
str = str + 1; | |
str = str.toString(); |