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/bash | |
old_head="$1" | |
new_head="$2" | |
branch_switch="$3" | |
git_root=$(git rev-parse --show-toplevel) | |
git diff --name-only $new_head $old_head | grep composer.lock > /dev/null |
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
<?php | |
use GeoJson\Geometry\Point; | |
$city = new City; | |
$city->name = 'Budapest'; | |
$city->coordinates = new Coordinates(47.51, 19.03); | |
$city->save(); | |
$city = DB::createQueryBuilder('City') |
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
<?php | |
$city = DB::createQueryBuilder('Ni\City') | |
->field('coordinates')->geoNear(46.1643154116, 18.9664363861) | |
->spherical(true) | |
->distanceMultiplier(6378.137) // rad => km | |
->limit(1) | |
->getQuery() | |
->getSingleResult(); |
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
alias codecept='() { vagrant ssh -c "cd /vagrant/www && vendor/bin/codecept $*" }' | |
alias composer='() { vagrant ssh -c "cd /vagrant/www && composer $*" }' |
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
class File | |
__construct($filename) | |
$this->workingCopy = new WorkingCopy($filename) | |
hasWorkingCopy() | |
return $this->workingCopy && $this->workingCopy->exists() | |
getWorkingCopy() | |
if (!$this->hasWorkingCopy()) | |
$this->workingCopy = new WorkingCopy(Storage::download($this->id)) | |
return $this->workingCopy |
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
input { | |
tcp { | |
type => "nginx" | |
port => 3333 | |
} | |
} | |
filter { | |
grok { | |
type => "nginx" |
NewerOlder