Lesser known git commands

Tim Pettersen shares some of his git aliases.

Git has a strong commitment to backwards compatibility: many powerful features are hidden behind options rather than exposed as default behaviour. Fortunately Git also supports aliases, so you can create your own commands that do all manner of Git magic. Here’s a selection of the more useful (or at least entertaining) aliases defined in my .gitconfig

https://hackernoon.com/lesser-known-git-commands-151a1918a60

Read more

Join 9,500+ smart developers

Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

A retrospective on creating Laravel Shift

Laravel Shift is a paid service that can upgrade a Laravel project. I've used it a couple of times. Although some manually work is needed to complete the upgrade, it has saved me many hours. The service has recently shifted it's 1000th project, a major milestone. In a post on his blog Jason shares how he started the service and where it's going in the future.

In this post, I want to focus more on reaching the milestone of 1,000 Laravel applications upgraded. This may not sound like many, however for my first SaaS product it marks the achievement of my stretch goal. So allow me to share the most important decision, biggest challenge, and what the future holds for Laravel Shift.

http://jason.pureconcepts.net/2016/09/laravel-shift-1000-applications-upgraded/

Read more

Getting started with dotfiles

Dries Vints does not blog often, but when he does it's very much worth your time to read.

We all have specific ways of setting up our computer. It's all different somehow. The apps we use, our IDE settings, what shell we prefer, what programming languages we work with, the tools we prefer. How on earth are we going to get that specific setup back the way we had it before our computer broke down?

Enter dotfiles.

https://driesvints.com/blog/getting-started-with-dotfiles

You can find Dries' dotfiles on GitHub. Mine can be found here.

Read more

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.

Read more

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.

Read more

Some awesome composer tricks

Composer really needs no introduction. At this point the PHP community pulled in billions of packages. Here are some Composer options that are not so well known.

You can view the versions of all the packages in your project by running composer show -i. Let's try it out in our Blender Laravel template:

composer -i

Want to see all the dependencies of the installed packages in a tree? Then run composer show -t:

composer -t

If you need help using a specific package then you can open it's documentation in a browser using composer. Try running composer home spatie/laravel-fractal to see it in action.

Know some other nice Composer tricks? Let me know in the comments below.

Read more

Vim for beginners

Last year I made myself a bit acquainted with Vim. I'm by no means an expert and am not (yet :-)) advocating to replace your favourite IDE with Vim. I use it for small things:

  • it's much easier/faster to to edit files on a server using Vim as opposed to opening and editing the files in a tool like Transmit. There's a big chance that vim is already installed on your server.
  • editing your hostfile is breeze with vim.
  • if you need a small change, like deleting a line, in a file and you're IDE isn't open, Vim can help you.
  • there's a big change that you already use Vim when Git promts you to specify a commit message
Unlike most pieces of software, Vim has absolutely no respect for the beginner. Even quitting it proves quite difficult. There's really nobody that can use Vim without some training. But with same quick pointers everybody can do the tasks mentioned above.

Watch this video clearly explains the basic commands.

https://www.youtube.com/watch?v=Nim4_f5QUxA

Read more

The Art of Command Line

Fluency on the command line is a skill often neglected or considered arcane, but it improves your flexibility and productivity as an engineer in both obvious and subtle ways. This is a selection of notes and tips on using the command-line that we've found useful when working on Linux. Some tips are elementary, and some are fairly specific, sophisticated, or obscure. This page is not long, but if you can use and recall all the items here, you know a lot.
https://github.com/jlevy/the-art-of-command-line/blob/master/README.md

Read more

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

Read more