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
| <?php | |
| class ThemosisValetDriver extends BasicValetDriver | |
| { | |
| /** | |
| * Determine if the driver serves the request. | |
| * | |
| * @param string $sitePath | |
| * @param string $siteName | |
| * @param string $uri |
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
| // inside boot() | |
| resolve(EngineManager::class)->extend('elasticsearch', function () { | |
| return new ElasticsearchEngine(ClientBuilder::fromConfig(config('scout.elasticsearch.config')), config('scout.elasticsearch.index')); | |
| }); |
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
| <div class="class">asd</div> |
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
| echo ">> Installing Elastic GPG Key" | |
| wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | apt-key add - | |
| echo ">> Adding deb package" | |
| echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list | |
| echo ">> Updating apt" | |
| add-apt-repository ppa:webupd8team/java | |
| apt-get update |
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
| <?php | |
| /* | |
| This function saved my life. | |
| found on: http://www.sitepoint.com/forums//showthread.php?t=438748 | |
| by: crvandyke | |
| It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?! | |
| */ | |
| $array = json_decode(json_encode($object), true); |
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
| #!/usr/bin/env bash | |
| echo ">>> Starting Install Script" | |
| # Update | |
| sudo apt-get update | |
| # Install MySQL without prompt | |
| sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
| sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' |
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 | |
| # Run this as sudo! | |
| # I move this file to /usr/local/bin/vhost and run command 'vhost' from anywhere, using sudo. | |
| # | |
| # Show Usage, Output to STDERR | |
| # | |
| function show_usage { | |
| cat <<- _EOF_ |
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
| alias restart-network="sudo ifconfig en0 down; sudo ifconfig en1 down;sudo ifconfig en0 up; sudo ifconfig en1 up"; |
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
| /* Clear Floated Elements | |
| ----------------------------------------------------------------------------------------------------*/ | |
| /* http://sonspring.com/journal/clearing-floats */ | |
| .clear { | |
| clear: both; | |
| display: block; | |
| overflow: hidden; | |
| visibility: hidden; |
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
| RewriteEngine on | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule ^([a-z]+)/([^/]*)$ resize.php?size=$1&file=$2 |