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 update | |
apt-get -y upgrade | |
apt install -y linux-headers-$(uname -r) build-essential dkms curl | |
tmpmount=/tmp/iso | |
vboxversion=$(curl -s -L https://download.virtualbox.org/virtualbox/LATEST-STABLE.TXT) | |
echo fetching $vboxversion | |
mkdir -p ${tmpmount} | |
vboxisourl="https://download.virtualbox.org/virtualbox/${vboxversion}/VBoxGuestAdditions_${vboxversion}.iso" | |
isoname="/tmp/VBoxGuestAdditions_${vboxversion}.iso" |
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 | |
set -e | |
GVERSION="1.10.3" | |
GFILE="go$GVERSION.linux-amd64.tar.gz" | |
GOPATH="$HOME/go" | |
GOROOT="/usr/local/go" | |
TMPDIR=/tmp |
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 update | |
apt-get -y upgrade | |
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | |
apt-get install apt-transport-https | |
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-6.x.list | |
add-apt-repository ppa:webupd8team/java | |
apt-get install -y elasticsearch oracle-java9-installer | |
apt-get install -y oracle-java9-set-default | |
systemctl daemon-reload | |
systemctl enable elasticsearch.service |
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
(zcat $(ls -tr /var/log/apt/history.log*.gz); cat /var/log/apt/history.log) 2>/dev/null | | |
egrep '^(Start-Date:|Commandline:)' | | |
grep -v aptdaemon | | |
egrep '^Commandline:' |
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
#### | |
# Install magneticod go-rewrite on a brand new scaleway ubuntu 16.04 instance | |
#### | |
apt-get update && apt-get -y upgrade | |
apt-get install -y software-properties-common python-software-properties git trickle | |
add-apt-repository ppa:gophers/archive | |
apt update | |
apt-get -y install golang-1.9-go | |
mkdir -p $HOME/go/src | |
cd $HOME/go/src |
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
<?php | |
//get default gatwway | |
exec("route -n | awk '{print $2}' | grep -v '0.0.0.0' | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'",$gw); | |
//nmap scan to get all devices with open port 8008 whis is what chromecast listens on | |
exec("nmap ".$gw[0]."/24 -p 8008 -oG - | grep 8008/open | awk '{print $2}'",$chromecasts); | |
$out=array(); | |
//loop through and get the setup info page data | |
foreach($chromecasts as $chromecast) { | |
$url='http://'.trim($chromecast).':8008/setup/eureka_info'; | |
$curl_handle=curl_init(); |
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
echo testing | |
pause |
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
# =================== YOUR DATA ======================== | |
SERVER_NAME="some-server-name" | |
SERVER_IP="111.111.11.11" | |
USER="someuser" | |
SUDO_PASSWORD="secret-password-one" | |
MYSQL_ROOT_PASSWORD="secret-password-two" |
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
# =================== YOUR DATA ======================== | |
SERVER_NAME="some-server-name" | |
SERVER_IP="111.111.11.11" | |
USER="someuser" | |
SUDO_PASSWORD="secret-password-one" | |
MYSQL_ROOT_PASSWORD="secret-password-two" |
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/sh | |
apt-get update && apt-get upgrade | |
systemctl stop apache2 | |
apt-get remove --purge apache2 | |
apt-get install -y nginx | |
systemctl start nginx | |
systemctl enable nginx | |
systemctl status nginx | |
apt-get install -y php-fpm php-mysql | |
apt-get install -y mysql-server |