Compare commits

..

12 Commits

3 changed files with 240 additions and 11 deletions

214
pages/diet.php Executable file
View File

@ -0,0 +1,214 @@
#!/usr/bin/php
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "Diet";
}
include "helpers/body_open.php";
?>
<div class="row">
<h1 class="col-12 title">Current Diet</h1>
<div class="col-12 header center" >
<img src="/files/media/icons/tbd.jpg" alt="Image TBD">
</div>
</div>
<div class="row">
<div class="col-12 text">
<p>
My diet is 100% vegan and focuses on a high carb low fat
macronutrient ratio from whole foods. I consume as many raw meals
as possible and prefer to cook for myself.
<!--Purchase priorities are 1) Non-GMO, 2) Local, 3) Organic.-->
</p>
<!-- -- >
<p>
I generally water fast until the sensation of an empty stomach
actually turns to hunger, then eat a raw fruit meal. If it's date
season or other high calorie fruit is readily available, the
whole day may be fruit, otherwise I make 1 large cooked meal such
as rice with veggies to cover the rest of the day's needs.
</p>
<!-- -->
</div>
</div>
<div class="row">
<h2 class="col-12 header" id="faves">Favorites</h2>
</div>
<div class="row">
<div class="col-12 text">
<strong>Fruit</strong>
<ol>
<li>Soursop</li>
<li>Durian</li>
<li>Pawpaw</li>
<li>Mamey Sapote</li>
</ol>
<p>Notable Mentions</p>
<ul>
<li>Dates</li>
<li>Longans</li>
<li>Cherimoya</li>
<li>Persimmons</li>
<li>Peaches & Nectarines</li>
<li>Fresh Coconut</li>
<li>Mango</li>
</ul>
<!-- -- >
<strong>Cooked</strong>
<ol>
<li></li>
<li></li>
<li></li>
</ol>
<!-- -->
</div>
</div>
<div class="row">
<h2 class="col-12 header" id="staples">Staples</h2>
</div>
<div class="row">
<div class="col-12 text">
<strong>Raw</strong>
<ul>
<li>Dates (Khadrawi, Barhi, Medjool)</li>
<li>Bananas</li>
<li>Apples (Autumn Crisp, Cosmic Crisp, Pink Lady, Granny Smith, Gala, Fuji)</li>
<li>Dried Mango (Natural Grocer's brand)
<ul><li>
This is best consumed rehydrated. The nectar is amazing!!
</li></ul>
</li>
</ul>
<strong>Cooked</strong>
<ul>
<li>Rice</li>
<li>Sweet Potato</li>
<li>Zucchini & Yellow Squash</li>
</ul>
</div>
</div>
<div class="row">
<h2 class="col-12 header" id="avoid">Allergies / Aversions</h2>
</div>
<div class="row">
<div class="col-12 text">
<p>
I've found that my body doesn't tolerate many foods found in modern diets.
</p>
<p>
Basically, if you wouldn't feed it to a dog or rabbit, I probably avoid it too.
</p>
<strong>High Reactivity</strong>
<p>
These are a quick "no". I'll smell the dish, but not eat!
</p>
<ul>
<li>Alliums (garlic, onions)
<!-- -- >
<ul><li>
Headaches, migraines, nightmares, night terrors, poor digestion.
</li></ul>
<!-- -->
</li>
<li>Caffeine (coffee, chocolate, cacao, cocoa)
<!-- -- >
<ul><li>
Headaches, intense sweating, jitters, anxiety, awful digestion.
</li></ul>
<!-- -->
</li>
<li>Grapes
<!-- -- >
<ul><li>Terrible digestion.</li></ul>
<!-- -->
</li>
<li>Tropical Nuts (peanuts, cashews, brazil nuts, etc)
<!-- -- >
<ul>
<li>Terrible digestion, lethargy, headaches.</li>
</ul>
<!-- -->
</li>
<li>Drugs & Alcohol
<!-- -- >
<ul><li>
People know me as the sober kid. I used cannabis on and off
until 2024 but was over recreational drugs by 2012. Now
that I'm happy I no longer need an escape. :)
</li></ul>
<!-- -->
</li>
</ul>
<strong>Medium Reactivity</strong>
<p>
I normally avoid these and only have them as rare exceptions.
</p>
<ul>
<li>Nightshades (tomato, peppers, potato, eggplant, tobacco, datura)
<!-- -- >
<ul>
<li>Mucous and lymph for days, poor digestion.</li>
<li>If cooked at a high enough temperature, like fries,
they become tolerable as long as theyre not overly oily.
</li>
</ul>
<!-- -->
</li>
<li>Cinnamon
<!-- -- >
<ul><li>Intense sweating, overheating.</li></ul>
<!-- -->
</li>
</ul>
<strong>Lower Reactivity</strong>
<p>
I may have these from time to time, but in very small amounts.
</p>
<ul>
<li>Fatty Nuts & Seeds (almonds, walnuts, pecans, sunflower seeds, etc)
<!-- -- >
<ul><li>Poor digestion, lethargy, </li></ul>
<!-- -->
</li>
<!-- -- >
<li>Quinoa
<!-- -- >
<ul><li>I want to love it, it just doesn't do anything!</li></ul>
-- >
</li>
<!-- -->
<li>Storebought/Pasteurized Juices
<!-- -- >
<ul><li>.</li></ul>
<!-- -->
</li>
<li>Tea (including herbal)
<!-- -- >
<ul><li>Needs to be comsumed with a meal, otherwise body may try to process it as one and leads to horrible digestion.</li></ul>
<!-- -->
</li>
<li>Legumes (beans, peas)
<!-- -- >
<ul><li>If not properly stored and cooked they cause me havoc.</li></ul>
<!-- -->
</li>
<li>Oily Meals
<!-- -- >
<ul><li></li></ul>
<!-- -->
</li>
<li>Empty Calories (donuts, cake, corn/potato chips, etc)
<!-- -- >
<ul><li>I want to love it, it just doesn't do anything!</li></ul>
<!-- -->
</li>
</ul>
</div>
</div>
<?php
include "helpers/body_close.php";
?>

View File

@ -131,13 +131,15 @@ function build_album_pages {
fi fi
## Put in the subpage HTML ## ## Put in the subpage HTML ##
# Set the count if this is the first loop. new_row="\t\t<div class='row text'>"
# Set the count and start a row if this is the first loop.
if [[ -z $count ]]; then if [[ -z $count ]]; then
count=0 count=0
fi echo -e "$newrow" >> $subpage
# Add a row for the next 2 images. # Else check if we need to start a new one for the next 2 images.
if (( $count % 2 == 0 )); then elif (( $count % 2 == 0 )); then
echo -e "\t\t<div class='row text'>" >> $subpage echo -e "\t\t</div>" >> $subpage
echo -e "$newrow" >> $subpage
fi fi
# Add the container for the image and its text. # Add the container for the image and its text.
echo -e "\t\t\t<div class='col-6 center'>" >> $subpage echo -e "\t\t\t<div class='col-6 center'>" >> $subpage
@ -160,10 +162,6 @@ function build_album_pages {
fi fi
# Close the image description and its link. # Close the image description and its link.
echo -e "</p>\n\t\t\t\t</a>\n\t\t\t</div>" >> $subpage echo -e "</p>\n\t\t\t\t</a>\n\t\t\t</div>" >> $subpage
# Close the row after an odd count.
if (( $count % 2 == 1 )); then
echo -e "\t\t</div>" >> $subpage
fi
count=$(( count + 1 )) count=$(( count + 1 ))
done done
echo -e "\t\t</div>" >> $subpage echo -e "\t\t</div>" >> $subpage
@ -249,7 +247,8 @@ function build_all_page {
count=0 count=0
fi fi
if [[ $count == 0 ]]; then if [[ $count == 0 ]]; then
echo -e "\t\t<div class=row text>" >> $allpage echo -e "\t\t</div>" >> $allpage
echo -e "\t\t<div class='row text'>" >> $allpage
fi fi
# Add a column. # Add a column.
@ -291,10 +290,16 @@ function build_all_page {
} }
## Main ## ## Main ##
beg_time="$SECONDS"
start_main_page start_main_page
build_album_pages build_album_pages
build_all_page build_all_page
end_main_page end_main_page
end_time="$SECONDS"
time="$(( $end_time - $beg_time ))"
echo "<!-- Script took '$time' seconds to process. -->" >> $mainpage
cat $mainpage cat $mainpage
exit 0 exit 0

12
run.sh
View File

@ -51,6 +51,9 @@ fi
cd $DIR cd $DIR
sudo="" sudo=""
if [[ -z $LOGNAME ]]; then
LOGNAME="`whoami`"
fi
if [[ $LOGNAME != "root" ]]; then if [[ $LOGNAME != "root" ]]; then
log "Using sudo since user is '$LOGNAME'." log "Using sudo since user is '$LOGNAME'."
sudo="sudo" sudo="sudo"
@ -69,6 +72,10 @@ if [[ ! `which npm` ]]; then
echo "- Installing NPM" echo "- Installing NPM"
$sudo apt-get install -y npm $sudo apt-get install -y npm
fi fi
if [[ ! `which curl` ]]; then
echo "- Installing Curl"
$sudo apt-get install -y curl
fi
# Directories and allowed page types are executable, others are not. # Directories and allowed page types are executable, others are not.
log "Fix any strange file permissions." log "Fix any strange file permissions."
@ -92,6 +99,7 @@ find files/photos/ -name "*".html -print -delete
http_code=0 http_code=0
port="${ports%% *}" port="${ports%% *}"
photos_uri=":$port/photos/" photos_uri=":$port/photos/"
beg_time="$SECONDS"
while [[ $http_code != "200" ]]; do while [[ $http_code != "200" ]]; do
log "Sleeping for '$count' while waiting for $photos_uri to come up." log "Sleeping for '$count' while waiting for $photos_uri to come up."
sleep $count sleep $count
@ -105,7 +113,9 @@ find files/photos/ -name "*".html -print -delete
count=$(( count + 1 )) count=$(( count + 1 ))
fi fi
done done
log "Finished checking for /photos/." end_time="$SECONDS"
time="$(( $end_time - $beg_time ))"
log "Finished checking for /photos/ after '$time' seconds."
} & } &
## Main ## ## Main ##