For homebrew version 0.9.5.
brew -v # => Homebrew 0.9.5
Install the current version of mysql.
# Install current mysql version
brew install mysql
| in One to One: | |
| u have to use HasOne on the first model and BelongsTo on the second model | |
| to add record on the first model (HasOne) use the save function | |
| example: $post->country()->save($country); | |
| to add record on the second model (BelongsTo) use the associate function | |
| example: $country->post()->associate($post)->save(); | |
| <?php | |
| /** | |
| * filter valid utf-8 byte sequences | |
| * | |
| * take over all valid bytes, drop an invalid sequence until first | |
| * non-matching byte, start over at that byte. | |
| * | |
| * @param string $str | |
| * @return string | |
| */ |
| function getVersionFromFile($filepath) { | |
| return [System.Diagnostics.FileVersionInfo]::GetVersionInfo($filepath) | |
| } | |
| function versionCompare($filepathReference, $filepathDifference) { | |
| $versionReference = getVersionFromFile $filepathReference | |
| $versionDifference = getVersionFromFile $filepathDifference | |
| #$versionReference | fl | |
| #$versionDifference | |
| return Compare-Object -ReferenceObject $versionReference -DifferenceObject $versionDifference -Property FileVersionRaw |
| <?php | |
| //disable execution time limit when downloading a big file. | |
| set_time_limit(0); | |
| /** @var \League\Flysystem\Filesystem $fs */ | |
| $fs = Storage::disk('local')->getDriver(); | |
| $fileName = 'bigfile'; | |
| $metaData = $fs->getMetadata($fileName); |
| develop your packages in a folder called, for example: packages/yourvendorname/packagename | |
| push you package to git / packagist | |
| after that, edit your main composer.json file so it will include you package (@section required) | |
| now you autoloader knows about your package. | |
| last but not least, the magic: | |
| cd vendor/yourvendorname && rm -rf packagename && ln -s ../../packages/yourvendorname/packagename | |
| now you can develop your package like it's in you live vendor directory. | |
| so... now also you dependencies will load which you included in your 'required' section in your package composer.json |
| sudo apt-get install ngrep | |
| sudo ngrep -W byline -qilwv 'referer' tcp dst port 80 | grep -i " -> \|get\|host" |
| <?php | |
| class FakeTest extends TestCase{ | |
| public function setUp(){ | |
| parent::setUp(); | |
| } | |
| public function tearDown(){ | |
| parent::tearDown(); | |
| Mockery::close(); | |
| } |
| [Desktop Entry] | |
| Name=PHPStorm | |
| Type=Application | |
| Terminal=false | |
| Exec=/home/edwin/Documenten/PhpStorm-145.1616.3/bin/phpstorm.sh | |
| Icon=/home/edwin/Documenten/PhpStorm-145.1616.3/bin/webide.png |
| . ./ShouldBeUpToDate.ps1 | |
| $pathExecutible = "C:\Program Files\Git\git-cmd.exe" | |
| $pathSetupfile = "C:\Users\<username>\Downloads\Git-2.8.3-64-bit.exe" | |
| ShouldBeUpToDate -pathExecutible $pathExecutible -pathSetupfile $pathSetupfile |