Working With PHPUnit and PhpStorm

On the JetBrains blog Gary Hockin explains how to easily run a single PHPUnit test.
To run all the tests in a single file, right-click the test in the Project Pane (the left-hand navigation pane), and select Run . To run all the tests in a single class, right-click the class name in the editor, and select Run . To run the tests in a single method, right-click the method name, and select Run .
https://blog.jetbrains.com/phpstorm/2017/01/working-with-phpunit-and-phpstorm/

Quickly open a GitHub page from your terminal

At Spatie we use GitHub for both our client projects as our open source code. So in our day to day work we often have to open the browser to view issues of a repo or review pull requests. Paul Irish, a well known developer and part of the Google Chrome team at Google, made a nice bash script to quickly open up a GitHub page from your terminal. If you're on a path inside a git repo and type "git open" that'll open up the corresponding page on GitHub. The command also supports, amongst others, repos hosted on GitLab.com and Bitbucket. https://github.com/paulirish/git-open

The magic behind Laravel Valet

Mohamed Said peeked behind the curtains and explains on his blog how Laravel Valet works behind the scenes.
The idea behind Valet is that it configures PHP's built-in web server to always run in the background when the operating system starts, then it proxies all requests to a given domain to point to your localhost 127.0.0.1
http://themsaid.github.io/magic-behind-laravel-valet-20160506/ If you want to keep Homestead around for some projects, know that your can also use dnsmasq to point an entire domain to your Homestead installation.

Introducing Laravel Valet

Chances are that if you've been following the news in the Laravel ecosystem that you've heard of Laravel Valent. If not: Laravel Valet is a super easy way to serve your sites in a development environment. It's dead simple to setup and use. Here's the intro video: https://www.youtube.com/watch?v=H3Z4Gk9Wc0s I think it's kinda amazing that it was built in just four days. Not everybody is a fan of the Valet approach be I sure do like it. At Spatie, we're going use Valet instead of Vagrant for most of our projects. Need to know more about Valet? Check out this post on dotdev.co and the official documentation.

Easy file sharing from the command line

Transfer.sh is a free service by Dutchcoders that allows you to easily share files from the command line. Here's an example of how you can use it:
transfer my-favorite-file.txt
The given file will be uploaded to the transfer.sh-servers and the command will respond with a short url linking to that file. Pretty neat! The only thing you need to do is set up a bash function called "transfer" (you can name it anything you want really). Don't trust the transfer.sh with your supersecret files? Then you can set up your own server to transfer the files to.

A beautiful PHPStorm theme

PHPStorm is the application I'm working in most of the time. So I want it to be as pretty as it can be. Right out the box PHPStorm contains two bat shit ugly themes: the default white one and the slightly better Darcula. Fortunately for all PHPStorm users out there long time Laravel community member Dayle Rees showed us the way to the light! A few years ago he created an abundance of colour schemes that are a pleasure to the eye. You can view all the schemes on the demo page. More recently Dayle created a new colour scheme called Material Peacock. This is what it looks like: material Very nice! Almost everywhere I open up PHPStorm people ask what that theme is, so I'm certainly not the only one who digs it. At this year's PHP UK Conference a PHPStorm-engineer from Jetbrains said it was the most beautiful theme he ever saw in his own product. You find instructions on how to install the theme (made by Chris Magnussen) and the colour scheme in Dayle's Material Peacock repo on GitHub.

Automatically test the quality of your code on commit

A few days ago Toon Verwerft gave an uncon talk at PHP Benelux Conference about a new code quality checking tool he has been developing. It's called GrumPHP. It can automatically perform various code quality checks when you try to commit some code.
Sick and tired of defending code quality over and over again? GrumPHP will do it for you! This composer plugin will register some git hooks in your package repository. When somebody commits changes, GrumPHP will run some tests on the committed code. If the tests fail, you won't be able to commit your changes. This handy tool will not only improve your codebase, it will also teach your co-workers to write better code following the best practices you've determined as a team.
https://github.com/phpro/grumphp The slides of Toon's talk can be found on speakerdeck.

Make Composer and npm lightning fast

Jack McDade, who designed the laravel.com and laracasts.com sites, shares some tips on how to make composer and npm much faster.
Whenever I run composer install or npm install I feel like an old man yelling at young punks to get off my lawn. Especially ever since npm3. I’ll save you the bitter diatribe and just get to the solution. But first, the problem. Creating, distributing, maintaining, and consuming third-party dependencies was supposed to make us more productive and our lives easier. Instead, I feel like I spend more time waiting than coding. So I dug and dug until I found solutions, as one does, and now I’m sharing them with you.
http://jackmcdade.com/blog/tired-of-waiting

Identify the software used on sites you visit

Every webdeveloper has probably at some point wondered which technologies a particular site is using. Sure, you could browse the source of a page to find any hints on for instance what cms is being used. Or you could inspect the response headers to see what version of php is used. Instead of hunting down those clues yourself, you could use the Wappalyzer plugin. Once installed it shows an extra icon in your browser. It indicates what sort of framework or cms is used. Clicking on the icon reveals even more info such as which JavaScript libraries are embedded on the site. It's a great tool. installed_firefox