diff --git a/README.md b/README.md index 5f89169..7d9cab2 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ npm install crypto npm install remarkable npm install markdown npm install highlight.js +npm install compression npm install memory-cache --save ``` diff --git a/downloads/content/1.jpg b/downloads/content/1.jpg index 7b11512..c66f9b6 100644 Binary files a/downloads/content/1.jpg and b/downloads/content/1.jpg differ diff --git a/entries/hardware/media/2ac00ccdcae9b672a2f844b7f8f318c5.png b/entries/hardware/media/2ac00ccdcae9b672a2f844b7f8f318c5.png index a2c0654..0efae1b 100644 Binary files a/entries/hardware/media/2ac00ccdcae9b672a2f844b7f8f318c5.png and b/entries/hardware/media/2ac00ccdcae9b672a2f844b7f8f318c5.png differ diff --git a/entries/hardware/media/31210e78cc2cae122a6c3fdb93ab87c0.png b/entries/hardware/media/31210e78cc2cae122a6c3fdb93ab87c0.png index 98f18d2..942108a 100644 Binary files a/entries/hardware/media/31210e78cc2cae122a6c3fdb93ab87c0.png and b/entries/hardware/media/31210e78cc2cae122a6c3fdb93ab87c0.png differ diff --git a/entries/hardware/media/3812f5e41805eb999b057c15bae19081.png b/entries/hardware/media/3812f5e41805eb999b057c15bae19081.png index 7b154f4..d1f8eaf 100644 Binary files a/entries/hardware/media/3812f5e41805eb999b057c15bae19081.png and b/entries/hardware/media/3812f5e41805eb999b057c15bae19081.png differ diff --git a/entries/hardware/media/d460663e2f964c76a15d2c07a7052d60.png b/entries/hardware/media/d460663e2f964c76a15d2c07a7052d60.png index 60eb2de..d8515fa 100644 Binary files a/entries/hardware/media/d460663e2f964c76a15d2c07a7052d60.png and b/entries/hardware/media/d460663e2f964c76a15d2c07a7052d60.png differ diff --git a/entries/hardware/media/f19479753c6d86855a3a77f1cf840942.png b/entries/hardware/media/f19479753c6d86855a3a77f1cf840942.png index ac334b2..cc4ac6d 100644 Binary files a/entries/hardware/media/f19479753c6d86855a3a77f1cf840942.png and b/entries/hardware/media/f19479753c6d86855a3a77f1cf840942.png differ diff --git a/entries/java/media/2a20326e77c3f67aa3753401ba4bc612.png b/entries/java/media/2a20326e77c3f67aa3753401ba4bc612.png index 60eeff4..60eb524 100644 Binary files a/entries/java/media/2a20326e77c3f67aa3753401ba4bc612.png and b/entries/java/media/2a20326e77c3f67aa3753401ba4bc612.png differ diff --git a/entries/java/media/2a96900bae1e8946a1df243d8318e69f.png b/entries/java/media/2a96900bae1e8946a1df243d8318e69f.png index ef6a384..2344c01 100644 Binary files a/entries/java/media/2a96900bae1e8946a1df243d8318e69f.png and b/entries/java/media/2a96900bae1e8946a1df243d8318e69f.png differ diff --git a/entries/java/media/c1e712bdead908ebd72921ec2d1cbd5e.png b/entries/java/media/c1e712bdead908ebd72921ec2d1cbd5e.png index be7581c..628073b 100644 Binary files a/entries/java/media/c1e712bdead908ebd72921ec2d1cbd5e.png and b/entries/java/media/c1e712bdead908ebd72921ec2d1cbd5e.png differ diff --git a/entries/java/media/f5cb2682e219549cb07acd1d01c2ccb1.png b/entries/java/media/f5cb2682e219549cb07acd1d01c2ccb1.png index 7d475a9..1b065fa 100644 Binary files a/entries/java/media/f5cb2682e219549cb07acd1d01c2ccb1.png and b/entries/java/media/f5cb2682e219549cb07acd1d01c2ccb1.png differ diff --git a/entries/programming/media/90703af9527d8d4aecc7eefbda5f049a.png b/entries/programming/media/90703af9527d8d4aecc7eefbda5f049a.png index cf5dae1..39bc43a 100644 Binary files a/entries/programming/media/90703af9527d8d4aecc7eefbda5f049a.png and b/entries/programming/media/90703af9527d8d4aecc7eefbda5f049a.png differ diff --git a/entries/programs/media/90e4464eb85c998c8db42c965468aa54.png b/entries/programs/media/90e4464eb85c998c8db42c965468aa54.png index 89c4aa5..0315d45 100644 Binary files a/entries/programs/media/90e4464eb85c998c8db42c965468aa54.png and b/entries/programs/media/90e4464eb85c998c8db42c965468aa54.png differ diff --git a/entries/projects/media/088cc48e754c1b99e0fcd5a5eddb9d64.png b/entries/projects/media/088cc48e754c1b99e0fcd5a5eddb9d64.png index 4980076..8feb3f4 100644 Binary files a/entries/projects/media/088cc48e754c1b99e0fcd5a5eddb9d64.png and b/entries/projects/media/088cc48e754c1b99e0fcd5a5eddb9d64.png differ diff --git a/entries/projects/media/09bce0ed13f28db38a141bd10bb096c8.jpg b/entries/projects/media/09bce0ed13f28db38a141bd10bb096c8.jpg index 00591e4..5219dbf 100644 Binary files a/entries/projects/media/09bce0ed13f28db38a141bd10bb096c8.jpg and b/entries/projects/media/09bce0ed13f28db38a141bd10bb096c8.jpg differ diff --git a/entries/projects/media/09d34d523359111041accf89c82fd6c2.png b/entries/projects/media/09d34d523359111041accf89c82fd6c2.png index 9e949f3..eeda184 100644 Binary files a/entries/projects/media/09d34d523359111041accf89c82fd6c2.png and b/entries/projects/media/09d34d523359111041accf89c82fd6c2.png differ diff --git a/entries/projects/media/0b9d25d56269d39f60177b6b29a882da.png b/entries/projects/media/0b9d25d56269d39f60177b6b29a882da.png index 59c1146..be55ed6 100644 Binary files a/entries/projects/media/0b9d25d56269d39f60177b6b29a882da.png and b/entries/projects/media/0b9d25d56269d39f60177b6b29a882da.png differ diff --git a/entries/projects/media/13f1d6d93532bfb23a03a9a4fec5f41b.png b/entries/projects/media/13f1d6d93532bfb23a03a9a4fec5f41b.png index 9fc004d..71e6331 100644 Binary files a/entries/projects/media/13f1d6d93532bfb23a03a9a4fec5f41b.png and b/entries/projects/media/13f1d6d93532bfb23a03a9a4fec5f41b.png differ diff --git a/entries/projects/media/161edc628257e8a2f92086c5987dcf0f.png b/entries/projects/media/161edc628257e8a2f92086c5987dcf0f.png index 9021dbc..eb632e1 100644 Binary files a/entries/projects/media/161edc628257e8a2f92086c5987dcf0f.png and b/entries/projects/media/161edc628257e8a2f92086c5987dcf0f.png differ diff --git a/entries/projects/media/23c6ad380e3224fbcd0c8d28cbecac23.png b/entries/projects/media/23c6ad380e3224fbcd0c8d28cbecac23.png index 703a04f..7459916 100644 Binary files a/entries/projects/media/23c6ad380e3224fbcd0c8d28cbecac23.png and b/entries/projects/media/23c6ad380e3224fbcd0c8d28cbecac23.png differ diff --git a/entries/projects/media/463f2aa188466da8f47309235039250c.jpg b/entries/projects/media/463f2aa188466da8f47309235039250c.jpg index e8825c5..0b4b2e2 100644 Binary files a/entries/projects/media/463f2aa188466da8f47309235039250c.jpg and b/entries/projects/media/463f2aa188466da8f47309235039250c.jpg differ diff --git a/entries/projects/media/50dc96254f26b730e842134db98c9966.jpg b/entries/projects/media/50dc96254f26b730e842134db98c9966.jpg index 4ca62f4..407115b 100644 Binary files a/entries/projects/media/50dc96254f26b730e842134db98c9966.jpg and b/entries/projects/media/50dc96254f26b730e842134db98c9966.jpg differ diff --git a/entries/projects/media/5b7a15fd7b5da2939f4e27eae4ceada3.jpg b/entries/projects/media/5b7a15fd7b5da2939f4e27eae4ceada3.jpg index 60e55f8..f0cdb25 100644 Binary files a/entries/projects/media/5b7a15fd7b5da2939f4e27eae4ceada3.jpg and b/entries/projects/media/5b7a15fd7b5da2939f4e27eae4ceada3.jpg differ diff --git a/entries/projects/media/5ebac37ad45784c31219451d6e4c4504.jpg b/entries/projects/media/5ebac37ad45784c31219451d6e4c4504.jpg index c51ec15..ee2d890 100644 Binary files a/entries/projects/media/5ebac37ad45784c31219451d6e4c4504.jpg and b/entries/projects/media/5ebac37ad45784c31219451d6e4c4504.jpg differ diff --git a/entries/projects/media/81ffef0249da3c1fc077d114fb6beecb.jpg b/entries/projects/media/81ffef0249da3c1fc077d114fb6beecb.jpg index 3bb5a8b..80ecbb3 100644 Binary files a/entries/projects/media/81ffef0249da3c1fc077d114fb6beecb.jpg and b/entries/projects/media/81ffef0249da3c1fc077d114fb6beecb.jpg differ diff --git a/entries/projects/media/ad84021445feb7021f2320f6be599ef5.png b/entries/projects/media/ad84021445feb7021f2320f6be599ef5.png index a8db2f8..7b3c104 100644 Binary files a/entries/projects/media/ad84021445feb7021f2320f6be599ef5.png and b/entries/projects/media/ad84021445feb7021f2320f6be599ef5.png differ diff --git a/entries/projects/media/d0888a3222fa328c291629fac491e268.jpg b/entries/projects/media/d0888a3222fa328c291629fac491e268.jpg index 996966b..d6e477c 100644 Binary files a/entries/projects/media/d0888a3222fa328c291629fac491e268.jpg and b/entries/projects/media/d0888a3222fa328c291629fac491e268.jpg differ diff --git a/entries/projects/media/d3f05acc1973ea938920407511c28bff.png b/entries/projects/media/d3f05acc1973ea938920407511c28bff.png index cfb8d88..0a8fe86 100644 Binary files a/entries/projects/media/d3f05acc1973ea938920407511c28bff.png and b/entries/projects/media/d3f05acc1973ea938920407511c28bff.png differ diff --git a/entries/projects/media/f8802f1f71cb433274d265fc81e36fc6.jpg b/entries/projects/media/f8802f1f71cb433274d265fc81e36fc6.jpg index ea01c17..6e3dcf6 100644 Binary files a/entries/projects/media/f8802f1f71cb433274d265fc81e36fc6.jpg and b/entries/projects/media/f8802f1f71cb433274d265fc81e36fc6.jpg differ diff --git a/entries/projects/media/fc0a0ddf2a914b171bb3a5013e9e7b6c.png b/entries/projects/media/fc0a0ddf2a914b171bb3a5013e9e7b6c.png index 7586e75..b608614 100644 Binary files a/entries/projects/media/fc0a0ddf2a914b171bb3a5013e9e7b6c.png and b/entries/projects/media/fc0a0ddf2a914b171bb3a5013e9e7b6c.png differ diff --git a/entries/projects/media/steam/ben2.png b/entries/projects/media/steam/ben2.png index 2296651..b0c12b5 100644 Binary files a/entries/projects/media/steam/ben2.png and b/entries/projects/media/steam/ben2.png differ diff --git a/entries/projects/media/steam/diagram.png b/entries/projects/media/steam/diagram.png index 5ff7b7a..3748f2c 100644 Binary files a/entries/projects/media/steam/diagram.png and b/entries/projects/media/steam/diagram.png differ diff --git a/entries/projects/media/steam/jrtechs1.png b/entries/projects/media/steam/jrtechs1.png index be1c84b..5d5fa58 100644 Binary files a/entries/projects/media/steam/jrtechs1.png and b/entries/projects/media/steam/jrtechs1.png differ diff --git a/entries/projects/media/steam/jrtechs2.png b/entries/projects/media/steam/jrtechs2.png index 1b35776..9513bf8 100644 Binary files a/entries/projects/media/steam/jrtechs2.png and b/entries/projects/media/steam/jrtechs2.png differ diff --git a/entries/web-development/media/0a829ea2071126a5642534f54bc0fe19.png b/entries/web-development/media/0a829ea2071126a5642534f54bc0fe19.png index 92aa4eb..ab23f95 100644 Binary files a/entries/web-development/media/0a829ea2071126a5642534f54bc0fe19.png and b/entries/web-development/media/0a829ea2071126a5642534f54bc0fe19.png differ diff --git a/entries/web-development/media/422d949d18969b9b2b8cf754ddc1e779.jpg b/entries/web-development/media/422d949d18969b9b2b8cf754ddc1e779.jpg index 7b11512..f4473a1 100644 Binary files a/entries/web-development/media/422d949d18969b9b2b8cf754ddc1e779.jpg and b/entries/web-development/media/422d949d18969b9b2b8cf754ddc1e779.jpg differ diff --git a/entries/web-development/media/4fcc3a9fe52f7b2e8bc1bfb164846073.png b/entries/web-development/media/4fcc3a9fe52f7b2e8bc1bfb164846073.png index 6ef2c67..d35e796 100644 Binary files a/entries/web-development/media/4fcc3a9fe52f7b2e8bc1bfb164846073.png and b/entries/web-development/media/4fcc3a9fe52f7b2e8bc1bfb164846073.png differ diff --git a/entries/web-development/media/55ad5b49fe28c6374968b0f8a5b3e48b.png b/entries/web-development/media/55ad5b49fe28c6374968b0f8a5b3e48b.png index 42b9a99..0c7b898 100644 Binary files a/entries/web-development/media/55ad5b49fe28c6374968b0f8a5b3e48b.png and b/entries/web-development/media/55ad5b49fe28c6374968b0f8a5b3e48b.png differ diff --git a/entries/web-development/media/fa157040d5849cc48de1cbec2c67ef69.jpg b/entries/web-development/media/fa157040d5849cc48de1cbec2c67ef69.jpg index d384513..e05f28c 100644 Binary files a/entries/web-development/media/fa157040d5849cc48de1cbec2c67ef69.jpg and b/entries/web-development/media/fa157040d5849cc48de1cbec2c67ef69.jpg differ diff --git a/entries/web-development/media/fbd5a1128549b4feb5bafe3595ac1989.png b/entries/web-development/media/fbd5a1128549b4feb5bafe3595ac1989.png index 51679c2..8004933 100644 Binary files a/entries/web-development/media/fbd5a1128549b4feb5bafe3595ac1989.png and b/entries/web-development/media/fbd5a1128549b4feb5bafe3595ac1989.png differ diff --git a/img/posts/computer.jpg b/img/posts/computer.jpg index 09aa5c9..8725ff2 100644 Binary files a/img/posts/computer.jpg and b/img/posts/computer.jpg differ diff --git a/img/posts/floppy2.jpg b/img/posts/floppy2.jpg index 8780b3e..7d7d77c 100644 Binary files a/img/posts/floppy2.jpg and b/img/posts/floppy2.jpg differ diff --git a/img/posts/rit1.jpg b/img/posts/rit1.jpg index 21ba2b8..a6bc4b2 100644 Binary files a/img/posts/rit1.jpg and b/img/posts/rit1.jpg differ diff --git a/img/posts/rit2.jpg b/img/posts/rit2.jpg index c024d03..cb2428e 100644 Binary files a/img/posts/rit2.jpg and b/img/posts/rit2.jpg differ diff --git a/img/posts/spaghetti.jpg b/img/posts/spaghetti.jpg index 56b2cc5..59d6ef6 100644 Binary files a/img/posts/spaghetti.jpg and b/img/posts/spaghetti.jpg differ diff --git a/img/posts/steamGraphWebBanner.png b/img/posts/steamGraphWebBanner.png index 5bf9c21..575c5eb 100644 Binary files a/img/posts/steamGraphWebBanner.png and b/img/posts/steamGraphWebBanner.png differ diff --git a/img/posts/wordpress_banner.jpg b/img/posts/wordpress_banner.jpg index 3357b52..ffce189 100644 Binary files a/img/posts/wordpress_banner.jpg and b/img/posts/wordpress_banner.jpg differ diff --git a/img/website/404.jpg b/img/website/404.jpg index 2de142b..b03e6f6 100644 Binary files a/img/website/404.jpg and b/img/website/404.jpg differ diff --git a/optimizeImages.sh b/optimizeImages.sh index 761d16b..2238aa0 100644 --- a/optimizeImages.sh +++ b/optimizeImages.sh @@ -1,10 +1,21 @@ #!/bin/bash -for f in $(find ./ -name '*.jpg' -or -name '*.JPG'); - do jpegoptim --size=500k $f; -done +WIDTH="690>" -for f in $(find ./ -name '*.png' -or -name '*.PNG'); - do optipng $f; +files=("./entries" "./img") + +for folder in "${files[@]}"; do + + for f in $(find $folder -name '*.jpg' -or -name '*.JPG'); do + convert "$f" -resize $WIDTH "$f" + jpegoptim --max=80 --strip-all --preserve --totals --all-progressive "$f" + done + + + for f in $(find $folder -name '*.png' -or -name '*.PNG'); do + + convert "$f" -resize $WIDTH "$f" + optipng -o7 -preserve "$f" + done done \ No newline at end of file diff --git a/server.js b/server.js index a84711e..c4b036b 100644 --- a/server.js +++ b/server.js @@ -11,18 +11,22 @@ const url = require('url'); const express = require("express"); -const session = require('express-session'); +//const session = require('express-session'); const includes = require('./includes/includes.js'); -const utils = require('./utils/utils.js'); const map = require('./utils/generateSiteMap.js'); map.main(); const app = express(); -app.use(session({ secret: utils.getFileLine('../session_secret'), cookie: { maxAge: 6000000 }})); +//app.use(session({ secret: utils.getFileLine('../session_secret'), cookie: { maxAge: 6000000 }})); + +//compresses the site + +var compression = require('compression') +app.use(compression()); const port = 8000;