I hereby claim:
- I am jeremielitzler on github.
- I am jeremiel (https://keybase.io/jeremiel) on keybase.
- I have a public key ASA25znnD7niehHlEChNW8wet1Mn48k09LBUTMUEqYYhmwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| #Default to dry-run mode | |
| DRY_RUN=true | |
| echo "Parse command line arguments" | |
| while [[ "$#" -gt 0 ]]; do | |
| case $1 in | |
| -D) DRY_RUN=false ;; | |
| *) echo "Unknown parameter: $1"; exit 1 ;; |
| function Update-ScoopApps { | |
| param ( | |
| [switch]$DryRun | |
| ) | |
| # Always run scoop update to refresh the database | |
| Write-Host "Refreshing Scoop database..." -ForegroundColor Cyan | |
| scoop update | |
| # Get the status output and parse it |
| namespace Awesome.Csharp.Utilities.EveryoneNeeds | |
| { | |
| public static class FileMagicNumberHelper | |
| { | |
| public static bool CheckUploadedFileMagicNumber(byte[] file) | |
| { | |
| //No file | |
| if (file == null) return false; | |
| //File contains less than 2 bytes | |
| if (file.Count() < 2) return false; |
| //Inspired from https://stackoverflow.com/a/59017439 | |
| function csvToJSON(csv, seperator) { | |
| var lines = csv.split("\n"); | |
| var result = []; | |
| var headers; | |
| headers = lines[0].split(seperator); | |
| for (var i = 1; i < lines.length; i++) { | |
| var obj = {}; | |
| let waitTime = 1000 | |
| const waitStep = 100; | |
| htmlFiles.forEach((htmlFile) => { | |
| delay(wait).then(() => { | |
| console.log("downloading: " + htmlFile.filename); | |
| download(htmlFile.content, htmlFile.filename, "text/html") | |
| console.log("downloaded: " + htmlFile.filename); | |
| }); | |
| wait += waitStep; | |
| }); |
| const locations = { | |
| usa: { | |
| alaska: ["Fairbanks", "Wasilla"], | |
| california: ["San Fransisco", "Los Angeles"], | |
| nevada: ["Las Vegas"], | |
| massachusetts: ["Charlton"], | |
| washington: ["Seattle"], | |
| } | |
| } |
| let appAlias = ""; | |
| if (location.hostname === "localhost") { | |
| appAlias = "/mws-restaurant-stage-1"; | |
| } | |
| function registerServiceWorker() { | |
| if (!navigator.serviceWorker) { | |
| console.log("ServiceWorker is not compatible with this browser..."); | |
| return; | |
| } |
| let appAlias = ""; | |
| if (location.hostname === "localhost") { | |
| appAlias = "/mws-restaurant-stage-1"; | |
| } | |
| const staticCacheName = "rreviews-data-v2"; | |
| const contentImgsCache = "rreviews-imgs"; | |
| const allCaches = [staticCacheName, contentImgsCache]; | |
| self.addEventListener("install", function(event) { | |
| event.waitUntil( |