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
#!/usr/bin/env bash | |
# shellcheck disable=SC2059 | |
readonly Bold='\e[1m' | |
readonly Bred='\e[1;31m' | |
readonly Byellow='\e[1;33m' | |
readonly reset='\e[0m' | |
__die() { echo -e " ${Bred}[x]${reset} ${Bold}Error :${reset} ${*}" >&2 && 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 | |
set -e | |
NAME=$1 | |
function ised() { | |
local exp=$1 | |
local location=$2 | |
if [[ $OSTYPE == darwin* ]]; then |
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 | |
function unarchive_all() { | |
for f in *.zip | |
do | |
unzip $f -d "$(echo $f | cut -d . -f 1)" | |
rm $f | |
done | |
for f in *.rar |
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
class HTTP { | |
static parseHeaders(headerLines) { | |
const headers = {}; | |
headerLines.forEach((line) => { | |
const lineParts = line.split(/ *: */); | |
headers[lineParts[0]] = lineParts[1]; | |
}); | |
return headers | |
} |