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 | |
# Debug mode: change to 'yes' to enable | |
DEBUG=no | |
function log() { | |
[ "${DEBUG}" = "yes" ] && echo $* | logger -t "$0[$$]" | |
} | |
function logpipe() { |
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 apt update | |
sudo apt install -y docker.io | |
sudo systemctl enable docker --now | |
sudo docker info | |
sudo usermod -aG docker $USER | |
newgrp docker | |
# docker-ce - raspberry-64 |
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 | |
#copied from https://raw.githubusercontent.com/Snoop05/raspberrypi/master/expand-rootfs.sh | |
VERSION="0.1" | |
if (($EUID < 1)); then | |
export ROOTDEV=$(mount | grep ' / '|cut -d' ' -f 1) | |
export ROOTPART=$(lsblk -no NAME $ROOTDEV) | |
export ROOTDISK=$(lsblk -no PKNAME $ROOTDEV) | |
export ROOTPARTNUM=$(cat /sys/class/block/$ROOTPART/partition) |
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/sh -eux | |
# Delete all Linux headers | |
dpkg --list \ | |
| awk '{ print $2 }' \ | |
| grep 'linux-headers' \ | |
| xargs apt-get -y purge; | |
# Remove specific Linux kernels, such as linux-image-3.11.0-15-generic but | |
# keeps the current kernel and does not touch the virtual packages, | |
# e.g. 'linux-image-generic', etc. | |
dpkg --list \ |
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 docker stop graylog | |
sudo docker rm graylog | |
sudo docker run --name graylog --link mongo --link elasticsearch -p 9100:9000 -p 12201:12201 -p 1514:1514 -e GRAYLOG_HTTP_EXTERNAL_URI="http://core.tripsaathi.com:9100/" -d graylog/graylog:4.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
#!/bin/sh | |
## If sudo is not available on the system, | |
## uncomment the line below to install it | |
# apt-get install -y sudo | |
sudo apt-get update -y | |
## Install prerequisites | |
sudo apt-get install curl gnupg -y |
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
#nano sudo vi /etc/yum.repos.d/webmin.repo | |
echo "[Webmin]" >> /etc/yum.repos.d/webmin.repo | |
echo "name=Webmin Distribution Neutral" >> /etc/yum.repos.d/webmin.repo | |
echo "#baseurl=http://download.webmin.com/download/yum" >> /etc/yum.repos.d/webmin.repo | |
echo "mirrorlist=http://download.webmin.com/download/yum/mirrorlist" >> /etc/yum.repos.d/webmin.repo | |
echo "enabled=1" >> /etc/yum.repos.d/webmin.repo | |
echo "" >> /etc/yum.repos.d/webmin.repo |
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
add-type @" | |
using System.Net; | |
using System.Security.Cryptography.X509Certificates; | |
public class TrustAllCertsPolicy : ICertificatePolicy { | |
public bool CheckValidationResult( | |
ServicePoint srvPoint, X509Certificate certificate, | |
WebRequest request, int certificateProblem) { | |
return true; | |
} | |
} |
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 nano /etc/apt/sources.list | |
add | |
deb http://download.webmin.com/download/repository sarge contrib | |
sudo apt update | |
wget -q -O- http://www.webmin.com/jcameron-key.asc | sudo apt-key add | |
sudo apt update | |
sudo apt install webmin | |
sudo ufw allow 10000 |
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
use admin | |
db.createUser({ user :"sonuame", pwd :"xxx", roles :["root"]}); | |
db.changePassword("sonuame", "xxxxxxx") |