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/zsh | |
# USAGE: ./encoder.sh some-video.mov | |
# Changed the MP4 settings to work with Safari | |
# OGG seems to work best just using the quality scale | |
# WEBM is just adjusted by bitrate depending on how much motion there is | |
IN=$1 | |
OUT=$(echo $1 | sed 's/^\(.*\)\.[a-zA-Z0-9]*$/\1/') | |
ffmpeg -i $IN -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3 -movflags +faststart $OUT.mp4 |
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 iptables -A INPUT -i lo -j ACCEPT | |
sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT | |
sudo iptables -A INPUT -j DROP | |
# Allow traffic coming from docker0 interface | |
sudo iptables -I INPUT 6 -i docker0 -p tcp --dport 3306 -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
# Let Apache be initial owner | |
chown -R www-data:www-data /var/www/html | |
# Create an admin user | |
adduser admin | |
usermod -a -G sudo admin | |
usermod -a -G www-data admin | |
# Create a deployment user | |
adduser deployer |
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
# CREATE USERS | |
sudo su <enter root password> | |
adduser devops | |
usermod -aG sudo devops | |
# SSH KEYGEN (LOCAL) | |
ssh-keygen <follow prompts and save> | |
cat ~/.ssh/yourkey_rsa.pub <copy contents> | |
# SSH KEYGEN (SERVER) |
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
# CREATE USERS | |
sudo su <enter root password> | |
adduser devops | |
usermod -aG sudo devops | |
# SSH KEYGEN (LOCAL) | |
ssh-keygen <follow prompts and save> | |
cat ~/.ssh/yourkey_rsa.pub <copy contents> | |
# SSH KEYGEN (SERVER) |
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
# SWITCH TO ROOT | |
sudo su | |
# CREATE A NEW USER | |
adduser devops | |
passwd whatevs | |
# GRANT SUDO | |
gpasswd -a devops wheel |
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
# VAGRANT FILE | |
config.vm.network "forwarded_port", guest: 80, host: 8080 | |
config.vm.network "forwarded_port", guest: 3306, host: 33060 | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.synced_folder "./webroot", "/var/www/html", create:true, owner:"apache", group:"apache" | |
# MYSQL BIND | |
Change 127.0.0.1 to 0.0.0.0 | |
# MYSQL/MARIADB COMMAND - ONLY DO THIS FOR LOCAL DEVELOPMENT!!! |
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
//================================================================================= | |
// WEBPACK MODULES | |
//================================================================================= | |
const ora = require('ora'); | |
const path = require('path'); | |
const chalk = require('chalk'); | |
const rimraf = require('rimraf') | |
const webpack = require('webpack'); | |
const config = require('./webpack.config'); |
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
//================================================================================= | |
// WEBPACK MODULES | |
//================================================================================= | |
const ora = require('ora'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
//================================================================================= | |
// WEBPACK OUTPUT PATHS |
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
{ | |
"name": "vue-webpack", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"devDependencies": { | |
"babel-core": "^6.24.1", | |
"babel-loader": "^7.0.0", | |
"babel-plugin-transform-runtime": "^6.23.0", | |
"babel-preset-es2015": "^6.24.1", |