# yum repository
$ vim /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
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
| cd /home/homeassistant/.homeassistant | |
| sudo mv configurator.py configurator.py-bak-$(date +%F-%T) | |
| sudo wget https://raw.githubusercontent.com/danielperna84/hass-configurator/master/configurator.py | |
| sudo wget -o settings.conf-dist https://raw.githubusercontent.com/danielperna84/hass-configurator/master/settings.conf | |
| sudo chmod +x configurator.py | |
| sudo chown homeassistant:homeassistant -R /home/homeassistant/.homeassistant | |
| sudo systemctl restart [email protected] |
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
| sudo curl -s 'https://pgp.mit.edu/pks/lookup?op=get&search=0x1657198823E52A61' | gpg --import && \ | |
| if z=$(curl -s 'https://install.zerotier.com/' | gpg); then echo "$z" | sudo bash; fi | |
| sudo zerotier-cli join a09acf02330557ac |
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
| sudo -u kayb-live n98-magerun.phar sys:maintenance | |
| sudo -u kayb-live n98-magerun.phar cache:disable | |
| sudo -u kayb-live mv magmi ../private | |
| sudo -u kayb-live sed -i 's/#MAGE_PHP_BIN="php"/MAGE_PHP_BIN="\/opt\/plesk\/php\/5.6\/bin\/php"/g' ./mage | |
| sudo -u kayb-live chmod +x ./mage | |
| sudo -u kayb-live ./mage mage-setup . | |
| sudo -u kayb-live ./mage config-set preferred_state stable | |
| sudo -u kayb-live ./mage sync | |
| sudo -u kayb-live ./mage install connect20.magentocommerce.com/community Mage_All_Latest --force | |
| sudo -u kayb-live n98-magerun.phar index:reindex:all |
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
| function hass-upgrade { | |
| echo "Stopping homeassistant" | |
| sudo systemctl stop [email protected] | |
| sudo -u homeassistant -H /bin/bash <<EOF | |
| echo "Activating virtualenv" | |
| source /srv/homeassistant/bin/activate |
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 xdg-open | |
| # | |
| # save as ~/Desktop/reboot-into-windows.desktop | |
| # | |
| [Desktop Entry] | |
| Version=1.0 | |
| Type=Application | |
| Terminal=false | |
| Exec=sh -c 'gksu "sudo grub-reboot 'osprober-efi-4C8A-18B4'" && gnome-session-save --shutdown-dialog' |
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
| mkdir certbot | |
| cd certbot | |
| wget https://dl.eff.org/certbot-auto | |
| chmod a+x certbot-auto | |
| ./certbot-auto certonly --standalone --standalone-supported-challenges http-01 --email [email protected] -d public.tower112.islet.be |
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
| curl -s https://install.zerotier.com/ | sudo bash | |
| sudo zerotier-cli join 17d709436cf4a2e0 |
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 | |
| certname="snowplaza-multidomain-2016" | |
| download="https://c.connexeon.com/s/JEEkVryAM0JC1JG/download" | |
| apt-get install unzip | |
| rm -f $certname.zip | |
| rm -rf $certname/ | |
| wget $download | |
| mv download $certname.zip |
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
| # Resets the password for the default LXSS / WSL bash user | |
| $lxssUsername = (Get-ItemProperty HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss).DefaultUsername | |
| lxrun /setdefaultuser root | |
| bash -c "passwd $lxssUsername" | |
| lxrun /setdefaultuser $lxssUsername |