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
| <?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); |
| 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 | |
| // edit app/config/local/database.php -> 'log' => true | |
| // @ http://stackoverflow.com/questions/19131731/laravel-4-logging-sql-queries | |
| if (Config::get('database.log', false)) { | |
| Event::listen('illuminate.query', function($query, $bindings, $time, $name) { | |
| $data = compact('bindings', 'time', 'name'); | |
| // Format binding data for sql insertion | |
| foreach ($bindings as $i => $binding) { |
| 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(); | |
| } |
| place this in .profile @ ~/ (user's home) | |
| if [ -d "$HOME/.composer/vendor/bin" ] ; then | |
| PATH="$PATH:$HOME/.composer/vendor/bin" | |
| fi | |
| of..... onderaan je .profile: | |
| export PATH=$PATH:/home/edwin/.composer/vendor/bin | |
| (werkt beter @ ubuntu) |