- Mac OS host machine (10.6+)
- VirtualBox (4.1+)
- Vagrant (1.0+)
- Connecting via VPN to a remote network
- Mounting a directory from your host machine to the guest machine using NFS with something like this:
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
| {{ $var }} - Echo content | |
| {{ $var or 'default' }} - Echo content with a default value | |
| {{{ $var }}} - Echo escaped content | |
| {{-- Comment --}} - A Blade comment | |
| @extends('layout') - Extends a template with a layout | |
| @if(condition) - Starts an if block | |
| @else - Starts an else block | |
| @elseif(condition) - Start a elseif block | |
| @endif - Ends a if block |
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
| /** | |
| * $q query term | |
| * 'field' => 'suggest'> Suggest is the fieldname used during indexing | |
| * see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-completion.html | |
| */ | |
| $elasticaClient = new \Elastica\Client(); | |
| $elasticaIndex = $elasticaClient->getIndex('myindex'); | |
| $search = new \Elastica\Search($elasticaClient); | |
| $suggest = new \Elastica\Suggest\Term(); | |
| $suggest->addTerm('suggest', ['text' => $q, 'completion' => ['field' => 'suggest']]); |
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
| /*! | |
| * jQuery Form Plugin | |
| * version: 2.52 (07-DEC-2010) | |
| * @requires jQuery v1.3.2 or later | |
| * | |
| * Examples and documentation at: http://malsup.com/jquery/form/ | |
| * Dual licensed under the MIT and GPL licenses: | |
| * http://www.opensource.org/licenses/mit-license.php | |
| * http://www.gnu.org/licenses/gpl.html | |
| */ |
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
| #List vms | |
| VBoxManage list vms | |
| #get status of time sync | |
| VBoxManage getextradata <vm-name> VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled | |
| #NOTE: Make sure to restart the VM after changing these settings. | |
| #disable time sync | |
| VBoxManage setextradata <vm-name> VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled 1 |
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
| // PDO Connection to MySQL | |
| $conn = new PDO('mysql:host=localhost;dbname=yourdbname', 'username', 'password'); | |
| // PDO Connection to PostgreSQL | |
| $conn = new PDO('pgsql:host=localhost;dbname=yourdbname', 'username', 'password'); | |
| // A quick Select Query with For Loop | |
| foreach ($conn->query("SELECT * FROM profile") as $row) | |
| echo $row['fullname']; |
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 | |
| # This way you can customize which branches should be skipped when | |
| # prepending commit message. | |
| if [ -z "$BRANCHES_TO_SKIP" ]; then | |
| BRANCHES_TO_SKIP=(master develop test) | |
| fi | |
| BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
| BRANCH_NAME="${BRANCH_NAME##*/}" |
NewerOlder