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
$lat = $this->listing->latitude; | |
$lon = $this->listing->longitude; | |
$params = [ | |
"index" => "listings", | |
"body" => [ | |
"from" => 0, | |
"size" => 26, | |
"query" => [ | |
"bool" => [ |
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
$default = [ | |
"query_string" => [ | |
"default_operator" => "AND", | |
"fields" => ["name","desc","tags","city"], | |
"query" => $query | |
] | |
]; | |
$filtered = [ | |
"bool" => [ |
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", |
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
//================================================================================= | |
// 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
# 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
# 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
# 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
# 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 |
NewerOlder