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
| # Copyright (c) 2013 Georgios Gousios | |
| # MIT-licensed | |
| create database stackoverflow DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; | |
| use stackoverflow; | |
| create table badges ( | |
| Id INT NOT NULL PRIMARY KEY, | |
| UserId INT, |
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
| #create user and give him a home directory | |
| useradd -m USERNAME | |
| passwd USERNAME | |
| #put user in sudoer file | |
| sudo usermod -aG sudo <username> | |
| #make sure user uses a bash shell, so .bashrc will work | |
| chsh -s /bin/bash <username> |
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 -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
| sudo apt-get install -y nodejs | |
| sudo apt-get install -y python build-essential git | |
| git config --global user.name "Tom" | |
| git config --global user.email tom@example.com | |
| #update npm to latest | |
| sudo npm install npm -g |
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 | |
| STARTERDOMAIN="example.com" # name of 1st domain on this server | |
| SERVERNAME="example" # we'll set hostname to this | |
| ADMIN_NAME="admin" # will be set up as an admin user | |
| ADMIN_PASS="admin password" | |
| APACHE_VHOST="$STARTERDOMAIN" # we'll also use this for our DOMAINNAME for email, hostname -f, etc | |
| SSLPATH="/etc/apache2/ssl" |
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
| export HISTSIZE=9999 | |
| export HISTFILESIZE=999999 | |
| #Have history from any terminal appended to the same history file | |
| shopt -s histappend | |
| #Set default creation file/directory permissions | |
| umask u=rwx,g=rwx,o=r | |
| # Set xterm Title |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Verifying that +tomcarlson is my openname (Bitcoin username). https://onename.io/tomcarlson |
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
| # ban/unban, and look at banned ip-address using iptables | |
| ban() | |
| { | |
| sudo iptables -A INPUT -s $1 -j DROP | |
| } | |
| unban() | |
| { | |
| sudo iptables -D INPUT -s $1 -j DROP | |
| } |
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
| # Create self-signed SSL Key to allow secure comms to website | |
| # http://www.thegeekstuff.com/2009/07/linux-apache-mod-ssl-generate-key-csr-crt-file/ | |
| CERTIFICATE_DAYS=2000 | |
| PASSPHRASE="NO-PASS_TODAY@!" | |
| #Certificate Parameters | |
| SSL_DOMAIN=$1 |
NewerOlder