Cleanup some root files

This commit is contained in:
Nabeel Shahzad 2017-12-07 22:20:01 -06:00
parent 4f191b30f7
commit d2ce5e8f15
6 changed files with 1 additions and 255 deletions

View File

@ -19,7 +19,7 @@ before_script:
script:
- php artisan database:create --reset
- php artisan migrate:refresh --seed
- cp phpunit.travis.xml phpunit.xml
- cp tests/phpunit.travis.xml phpunit.xml
- vendor/bin/phpunit --debug --verbose
after_success:

View File

@ -1,5 +0,0 @@
#!/bin/sh
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.

208
aliases
View File

@ -1,208 +0,0 @@
alias ..="cd .."
alias ...="cd ../.."
alias h='cd ~'
alias c='clear'
alias art=artisan
alias phpspec='vendor/bin/phpspec'
alias phpunit='vendor/bin/phpunit'
alias serve=serve-laravel
alias xoff='sudo phpdismod -s cli xdebug'
alias xon='sudo phpenmod -s cli xdebug'
function artisan() {
php artisan "$@"
}
function dusk() {
pids=$(pidof /usr/bin/Xvfb)
if [ ! -n "$pids" ]; then
Xvfb :0 -screen 0 1280x960x24 &
fi
php artisan dusk "$@"
}
function serve-apache() {
if [[ "$1" && "$2" ]]
then
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/serve-apache.sh
sudo bash /vagrant/vendor/laravel/homestead/scripts/serve-apache.sh "$1" "$2" 80
else
echo "Error: missing required parameters."
echo "Usage: "
echo " serve-apache domain path"
fi
}
function serve-laravel() {
if [[ "$1" && "$2" ]]
then
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/serve-laravel.sh
sudo bash /vagrant/vendor/laravel/homestead/scripts/serve-laravel.sh "$1" "$2" 80
else
echo "Error: missing required parameters."
echo "Usage: "
echo " serve domain path"
fi
}
function serve-proxy() {
if [[ "$1" && "$2" ]]
then
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/serve-proxy.sh
sudo bash /vagrant/vendor/laravel/homestead/scripts/serve-proxy.sh "$1" "$2" 80
else
echo "Error: missing required parameters."
echo "Usage: "
echo " serve-proxy domain port"
fi
}
function serve-silverstripe() {
if [[ "$1" && "$2" ]]
then
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/serve-silverstripe.sh
sudo bash /vagrant/vendor/laravel/homestead/scripts/serve-silverstripe.sh "$1" "$2" 80
else
echo "Error: missing required parameters."
echo "Usage: "
echo " serve-silverstripe domain path"
fi
}
function serve-spa() {
if [[ "$1" && "$2" ]]
then
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/serve-spa.sh
sudo bash /vagrant/vendor/laravel/homestead/scripts/serve-spa.sh "$1" "$2" 80
else
echo "Error: missing required parameters."
echo "Usage: "
echo " serve-spa domain path"
fi
}
function serve-statamic() {
if [[ "$1" && "$2" ]]
then
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/serve-statamic.sh
sudo bash /vagrant/vendor/laravel/homestead/scripts/serve-statamic.sh "$1" "$2" 80
else
echo "Error: missing required parameters."
echo "Usage: "
echo " serve-statamic domain path"
fi
}
function serve-symfony2() {
if [[ "$1" && "$2" ]]
then
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/serve-symfony2.sh
sudo bash /vagrant/vendor/laravel/homestead/scripts/serve-symfony2.sh "$1" "$2" 80
else
echo "Error: missing required parameters."
echo "Usage: "
echo " serve-symfony2 domain path"
fi
}
function share() {
if [[ "$1" ]]
then
ngrok http ${@:2} -host-header="$1" 80
else
echo "Error: missing required parameters."
echo "Usage: "
echo " share domain"
echo "Invocation with extra params passed directly to ngrok"
echo " share domain -region=eu -subdomain=test1234"
fi
}
function flip() {
sudo bash /vagrant/vendor/laravel/homestead/scripts/flip-webserver.sh
}
function __has_pv() {
$(hash pv 2>/dev/null);
return $?
}
function __pv_install_message() {
if ! __has_pv; then
echo $1
echo "Install pv with \`sudo apt-get install -y pv\` then run this command again."
echo ""
fi
}
function dbexport() {
FILE=${1:-/vagrant/mysqldump.sql.gz}
# This gives an estimate of the size of the SQL file
# It appears that 80% is a good approximation of
# the ratio of estimated size to actual size
SIZE_QUERY="select ceil(sum(data_length) * 0.8) as size from information_schema.TABLES"
__pv_install_message "Want to see export progress?"
echo "Exporting databases to '$FILE'"
if __has_pv; then
ADJUSTED_SIZE=$(mysql --vertical -uhomestead -psecret -e "$SIZE_QUERY" 2>/dev/null | grep 'size' | awk '{print $2}')
HUMAN_READABLE_SIZE=$(numfmt --to=iec-i --suffix=B --format="%.3f" $ADJUSTED_SIZE)
echo "Estimated uncompressed size: $HUMAN_READABLE_SIZE"
mysqldump -uhomestead -psecret --all-databases --skip-lock-tables 2>/dev/null | pv --size=$ADJUSTED_SIZE | gzip > "$FILE"
else
mysqldump -uhomestead -psecret --all-databases --skip-lock-tables 2>/dev/null | gzip > "$FILE"
fi
echo "Done."
}
function dbimport() {
FILE=${1:-/vagrant/mysqldump.sql.gz}
__pv_install_message "Want to see import progress?"
echo "Importing databases from '$FILE'"
if __has_pv; then
pv "$FILE" --progress --eta | zcat | mysql -uhomestead -psecret 2>/dev/null
else
cat "$FILE" | zcat | mysql -uhomestead -psecret 2>/dev/null
fi
echo "Done."
}
function xphp() {
(php -m | grep -q xdebug)
if [[ $? -eq 0 ]]
then
XDEBUG_ENABLED=true
else
XDEBUG_ENABLED=false
fi
if ! $XDEBUG_ENABLED; then xon; fi
php \
-dxdebug.remote_host=192.168.10.1 \
-dxdebug.remote_autostart=1 \
"$@"
if ! $XDEBUG_ENABLED; then xoff; fi
}

View File

@ -1,20 +0,0 @@
'use strict';
/**
*
*/
/*
var gulp = require('gulp');
var cp = require('child_process');
function exec(cmd) {
cp.exec(cmd, function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
});
}
gulp.task('reset', function() {
exec('php artisan migrate:refresh --seed --seeder DevelopmentSeeder');
});
*/

View File

@ -1,21 +0,0 @@
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
$uri = urldecode(
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
);
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. This provides a convenient way to test a Laravel
// application without having installed a "real" web server software here.
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
return false;
}
require_once __DIR__.'/public/index.php';