Text input effects
A nice collection of input field animations:
A nice collection of input field animations:
A repository is a collection, a collection that holds entities and which can filter and return entities back based on the needs of your application. How it actually holds those entities is an implementation detail.http://shawnmc.cool/the-repository-pattern
A clear and concise explanation of the repository pattern.
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.
"Freek’s newsletter is one of the best ways to stay updated with the Laravel and PHP ecosystem. It consistently highlights useful packages, tools, and ideas from the community, especially the amazing work coming from Spatie. As a Laravel developer building SaaS and web platforms, I find it extremely helpful to discover practical tools and insights that improve my development workflow."
Because the properties for the object are predefined PHP no longer has to store the data in a hashtable, but instead can say that `$foo` is property 0, `$bar` is property 1, `$baz` is property 2 and then just store the properties in a three-element C array.https://gist.github.com/nikic/5015323This means that PHP only needs one hashtable in the class that does the property-name to offset mapping and uses a memory-efficient C-array in the individual objects. Arrays on the other hand need the hashtable for every array.
Supercharge OSX' Quick Look with these plugins:
https://github.com/sindresorhus/quick-look-plugins
You can opt to install them manually, the cool kids prefer to do this with Homebrew Cask.
Awesome talk by David Heneimeir Hansson, the creator of Ruby On Rails. The short version: don't just blindly follow design patterns and value clarity over testability.
https://www.youtube.com/watch?v=9LfmrkyP81M
https://www.andyjeffries.co.uk/25-tips-for-intermediate-git-users/As someone who’s always felt fairly comfortable in Git, I thought sharing some of the nuggets I learnt with the community might help someone to find an answer without needing to do lots of research.
The arrival of HTTP/2 will require a bit of re-thinking how we handle websites (and webservers), so perhaps it's time to reflect on what those changes can bring. This post is based entirely on theory (the HTTP2 spec), as HTTP/2 is hard to test today (with a lack of servers and browser support).https://ma.ttias.be/architecting-websites-http2-era/
... You can’t accumulate all that knowledge just by writing some code every day. Read books, discuss them with others, read other people’s code, experiment, draw on a whiteboard, or take a walk and just think.http://verraes.net/2014/10/software-design-is-just-theory/
I didn't know, until a colleague mentioned it today, PhpStorm offers a clipboard history.
On the mac press cmd+shift+v to invoke it.
By default it only stores the last 5 copied items, but you can increase that number in the preferences.
Very handy!
Glide is a wonderfully easy on-demand image manipulation library written in PHP. It’s straightforward API is exposed via HTTP, similar to cloud image processing services like Imgix and Cloudinary. Glide leverages powerful libraries like Intervention Image (for image handling and manipulation) and Flysystem (for file system abstraction).http://glide.thephpleague.com/
It comes with the ability to secure image URL's using a private signing key. I'm a bit worried about flooding the server but the owner of the package states that
... the cache filesystem + caching in league/flystem (with Redis/Memcache) should (at least this is the case in my testing) result in a speedy response...There's also a risk that over time your cache will become gigantic. The maintainers of the package are already discussing possible solutions.
Capistrano is a server automation and deployment tool. It makes a whole bunch of servers simultaneously perform actions. This could be deploying our application, or clearing their cache.https://www.airpair.com/laravel/posts/automating-laravel-deployments-using-capistranoCapistrano tells each of our servers to pull the latest branch from Git, perform any necessary build steps, and deploy the application on itself. Setting up this process is what we'll be detailing.
If you want to use something simpler, take a look at Deployer.
For projects with a long life expectancy, investing in your test suite is well worth it. Proper automated testing is a careful balance. Quickly introduce tests when you need them, and build a comprehensive, fast, and reliable test suite in the long run. We hope this post can give you some ammunition to win your team to this idea.http://everzet.com/post/107204911916/economy-of-tests
BLOKK is a font for quick mock-ups and wireframing for clients who do not understand latin.http://blokkfont.com/
Here's a big list of things to be aware of when switching an http site over to https. Ignore the bit about social buttons, just don't use them.
A perceptual hash is a fingerprint of a multimedia file derived from various features from its content. Unlike cryptographic hash functions which rely on the avalanche effect of small changes in input leading to drastic changes in the output, perceptual hashes are "close" to one another if the features are similar.The code: https://github.com/jenssegers/php-imagehash
The blogpost: http://jenssegers.be/blog/61/perceptual-image-hashes
PHPCI is a free and open source continuous integration tool specifically designed for PHP. Built with simplicity in mind and featuring integrations with all of your favourite testing tools, we've created the very best platform for testing your PHP projects.https://www.phptesting.org/
Over at Sitepoint Peter Nijssen wrote a good overview of the offered functionality.
I've been playing around with the self-hosted version. It comes with a bunch of plugins that are installed by default.
I can recommended it if you, like me, are starting out with CI.
Event Sourcing is a concept you'll start to hear more and more in the development community. Yet, there's no real aggregate of different talks or just resources in general available. Everything is spread out. Getting started with Event Sourcing isn't the easiest thing to do.http://nicolaswidart.com/blog/get-up-and-running-with-event-sourcingThis post has as goal to regroup as much information as possible about event sourcing. This will include links to conference talks, slideshows, github repositories, blog posts, and so on.
Let's talk a bit about deployments.
All the new projects I work on are hosted on servers that are provisioned by Forge. Forge has a quick deploy feature that allows you to pull the lastest master-commit onto the server, install composer dependencies, run migrations and so on.
It has two main drawbacks:
Deployer is a deployment tool written in PHP, it's simple and functional. Deploy your code to all servers you want, it supports deploy via copy, or via VCS (like git), or via rsync. Run your tasks on all your servers, or use our recipes of common tasks for Symfony, Laravel, Zend Framework and Yii.You can install Deployer via composer. To use Deployer a deploy.php file must be added to your project. This file describes your deployment process. No worries, you can write it in php using a very clean and readable syntax. The documention on how to write the deploy.php-file is a bit vague at this point, but you'll get a good idea of how things work by taking a look at my deploy.php-file.
To run deployer you'll use this command:
[code lang="bash"]
dep
I've made a bash alias that uses the name of the git branch you're currently on:
[code lang="bash"]
alias deploy='dep deploy $(git symbolic-ref --short HEAD)'
Now deploying a branch is as easy as just typing "deploy" when standing on a git repo in your terminal. This is a much nicer way to handle deployments. What I really like is that, now a deploy.php stored in the git repo, the deployment process is also versioned.
If you find Deployer doesn't meet your needs, Rocketeer, Phing and Capistrano are some more advanced alternatives. Envoy is nice too, but I haven't found a way to run stuff locally.