Skip to content

Instantly share code, notes, and snippets.

View epreston's full-sized avatar

Ed Preston epreston

View GitHub Profile
@epreston
epreston / create-local-mysql-db-user.sh
Created June 27, 2021 11:08
create a quick mysql-user pair with strong password
#!/bin/bash
PASS=`pwgen -s 40 1`
mysql -uroot -p <<MYSQL_SCRIPT
CREATE DATABASE $1;
CREATE USER '$1'@'localhost' IDENTIFIED BY '$PASS';
GRANT ALL PRIVILEGES ON $1.* TO '$1'@'localhost';
FLUSH PRIVILEGES;
MYSQL_SCRIPT
@epreston
epreston / plesk-linux-deployment-cmds.txt
Created June 28, 2021 01:47
plesk deployment on linux
wget http://autoinstall.plesk.com/plesk-installer
chmod +x plesk-installer
./plesk-installer
@epreston
epreston / cloudlinux-lvemanager-install-cmds.txt
Created June 28, 2021 01:49
cloudlinux lvemanager install
yum install lvemanager
@epreston
epreston / cloudlinux-centos-deployment-cmds.txt
Last active June 28, 2021 01:49
cloudlinux deployment on centos - requires wget
wget http://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
sh cldeploy -k <key here>
yum update && yum upgrade
reboot
@epreston
epreston / cloudlinux-cagefs-deployment-cmds.txt
Created June 28, 2021 01:51
cloudlinux cagefs deployment
yum install cagefs
/usr/sbin/cagefsctl --init
@epreston
epreston / cloudlinux-php-selector-deployment-cmds.txt
Created June 28, 2021 01:52
cloudlinux php selector deployment
yum groupinstall alt-php
yum update cagefs lvemanager
@epreston
epreston / basic.gitignore
Created June 28, 2021 04:02
basic git ignore - exclude os specific system files
# Add any directories, files, or patterns you don't want to be tracked by version control
# Windows and OSX Specific System Files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
*.swp
ehthumbs.db
@epreston
epreston / basic.gitattributes
Last active June 28, 2021 04:09
basic gitattributes - uncomment to enable certain language stats
# Auto detect text files and perform LF normalization
* text=auto
# Files to remove from language stats for this project
# *.css linguist-vendored
# *.scss linguist-vendored
# *.html linguist-vendored
# *.js linguist-vendored
# *.php linguist-vendored
# *.py linguist-vendored
@epreston
epreston / basic.editorconfig
Created June 28, 2021 04:25
basic editorconfig - indent 2 spaces, single quote js, double quote html, protect package.json
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Space indentation
[*]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
@epreston
epreston / aws-cli-osx-deployment-cmds.txt
Last active June 29, 2021 10:39
aws-cli osx deployment
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
# confirm deployment
which aws
# returns: /usr/local/bin/aws
aws --version
# returns: aws-cli/2.2.14 Python/3.8.8 Darwin/20.5.0 exe/x86_64 prompt/off