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 off | |
setlocal enabledelayedexpansion | |
if {%1}=={} ( | |
echo Usage: %~nx0 [vhd] [letter] | |
exit /b 1 | |
) | |
set vhdPath=%~dpnx1 | |
set driveLetter=%2 |
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 -e | |
# cleanup old installation | |
rm -rf /etc/redis | |
rm -rf /var/lib/redis | |
rm $HOME/redis.sh | |
deluser --force --remove-home redis | |
# Install the Build and Test Dependencies | |
apt-get update |
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 -e | |
# Use the following variables to control your install: | |
# Password for the SA user (required) | |
MSSQL_SA_PASSWORD='P@ssw0rd' | |
# Product ID of the version of SQL server you're installing | |
# Must be evaluation, developer, express, web, standard, enterprise, or your 25 digit product key | |
# Defaults to developer |
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 -e | |
# | |
# pptpd installation script on my own CentOS 7 box. | |
# inspired by: https://www.digitalocean.com/community/questions/how-to-install-pptp-vpn-on-centos-7 | |
# and http://unix.stackexchange.com/questions/150837/redhat-centos-7-firewalld-best-practice-for-pptp-or-l2tp-ipsec-rules | |
# | |
# Author: 2015 Steve Yang <[email protected]> | |
# The script comes with ABSOLUTELY NO WARRANTY. | |
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
git config --global credential.helper store | |
git pull |
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-get install iptables-persistent | |
sudo iptables -A OUTPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 1433 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 9000 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT |
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 swapon --show | |
free -h | |
df -h | |
sudo fallocate -l 5G /swapfile | |
ls -lh /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile |
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
use admin | |
db.createUser({ user :"sonuame", pwd :"xxx", roles :["root"]}); | |
db.changePassword("sonuame", "xxxxxxx") |
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 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 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; | |
} | |
} |
OlderNewer