This file contains 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
[Unit] | |
Description=Add MCH Gateway | |
After=network.target | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/bin/route add <gateway> dev eth0 | |
ExecStart=/usr/bin/route add default gw <gateway> | |
[Install] |
This file contains 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 | |
sudo su | |
echo deb https://apt.dockerproject.org/repo ubuntu-`cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d'=' -f2` main >> /etc/apt/sources.list.d/docker.list | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F76221572C52609D | |
apt-get update | |
apt-get purge --auto-remove lxc-docker* -y && | |
apt-get purge --auto-remove docker.io* -y && | |
apt-get install docker-engine -y |
This file contains 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 | |
cd /tmp | |
if ! which lynx > /dev/null; then sudo apt-get install lynx -y; fi | |
if [ "$(getconf LONG_BIT)" == "64" ]; then arch=amd64; else arch=i386; fi | |
function download() { | |
wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | grep "$1" | grep "$2" | grep "$arch" | cut -d ' ' -f 4) | |
} |
This file contains 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
apt-get install unattended-upgrades apt-listchanges | |
dpkg-reconfigure -plow unattended-upgrades |
This file contains 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
Set the environment variable `CHOKIDAR_USEPOLLING=1` and Chokidar will switch to polling mode. | |
i.e. | |
"scripts": { | |
"lint:js": "eslint --ignore-path .gitignore --fix .", | |
"lint:css": "stylelint \"src/**/*.css\"", | |
"lint": "npm-run-all --parallel lint:*", | |
"start": "CHOKIDAR_USEPOLLING=1 phenomic start", | |
"build": "phenomic build", | |
"pretest": "npm run lint", | |
"test": "npm run build" |
This file contains 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 | |
createTunnel() { | |
/usr/bin/ssh -N -R 2222:localhost:22 serverUser@25.25.25.25 | |
if [[ $? -eq 0 ]]; then | |
echo Tunnel to jumpbox created successfully | |
else | |
echo An error occurred creating a tunnel to jumpbox. RC was $? | |
fi | |
} | |
/bin/pidof ssh |
This file contains 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 | |
HOSTNAME=$1 | |
LOGFILE=$HOSTNAME.log | |
Current_IP=$(host $HOSTNAME | head -n1 | cut -f4 -d ' ') | |
if [ ! -f $LOGFILE ]; then | |
/usr/sbin/ufw allow from $Current_IP to any app DNS | |
echo $Current_IP > $LOGFILE | |
else |
This file contains 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
<# | |
.SYNOPSIS | |
Sets a known folder's path using SHSetKnownFolderPath. | |
.PARAMETER KnownFolder | |
The known folder whose path to set. | |
.PARAMETER Path | |
The target path to redirect the folder to. | |
.NOTES | |
Forked from: https://gist.github.com/semenko/49a28675e4aae5c8be49b83960877ac5 | |
#> |
This file contains 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
sudo apt install -y apt-transport-https lsb-release ca-certificates | |
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg | |
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' | |
sudo apt update | |
sudo apt-get install -y php7.3 php7.3-common | |
sudo apt-get install -y php7.3-curl php7.3-xml php7.3-zip php7.3-gd php7.3-mysql php7.3-mbstring php7.3-sqlite3 | |
sudo apt-get purge -y php7.0 php7.0-common |
This file contains 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
When/If you run into the following when trying to install @vue/cli similar: | |
Maximum call stack size exceeded on npm install | |
Reinstall NPM: | |
https://github.com/brock/node-reinstall | |
Do perms if installed as root | |
https://stackoverflow.com/questions/51811564/sh-1-node-permission-denied |
OlderNewer