How to clear dns cache of Google Chrome
– Edit
You can view the dns cache of Google Chrome by surfing to
The cache can be cleared by clicking "Clear host cache"
– Edit
You can view the dns cache of Google Chrome by surfing to
The cache can be cleared by clicking "Clear host cache"
– Edit
One of the easiest way of increasing the responsiveness of your server and guarding against out of memory errors in your applications is to add some swap space. Swap is an area on a hard drive that has been designated as a place where the operating system can temporarily store data that it can no longer hold in RAM.https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04The information written to disk will be slower than information kept in RAM, but the operating system will prefer to keep running application data in memory and use swap for the older data. Overall, having swap space as a fall back for when your system's RAM is depleted is a good safety net.
In this guide, we'll cover how to create and enable a swap file on an Ubuntu 14.04 server.
Adding swap is only to be used to give your server a bit of breathing space. If your server is constantly using a lot of swap memory consider upgrading the amount of RAM.
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.
"Always fresh, useful tips and articles. Carefully selected community content. My favorite newsletter, which I look forward to every time."
– Edit
Just as "vagrant up" is a single command to create a development environment for any application, `vagrant push` is a single command to deploy any application.https://www.vagrantup.com/blog/vagrant-push-to-deploy.html
– Edit
Ultimately, we can even imagine a long term in which secure origins are so widely deployed that we can leave them unmarked (as HTTP is today), and mark only the rare non-secure origins.https://www.chromium.org/Home/chromium-security/marking-http-as-non-secure
I'm all for it.
by Freek Van der Herten – 3 minute read – Edit
Earlier today Spatie, the company where I work, launched a webshop polkadots.be. When the project started one of the first choices that we had to make was if we were going to use an existing solution or build our own custom solution. For this project we took an extensive look at some existing…
– Edit
Nginx Server Configs is a collection of configuration snippets that can help your server improve the web site's performance and security, while also ensuring that resources are served with the correct content-type and are accessible, if needed, even cross-domain.https://github.com/h5bp/server-configs-nginx
– Edit
WatchKit bears a striking resemblance to UIKit, which is not entirely surprising, given their shared history and purpose. Watches are different from phones and tablets, which themselves are different from desktops. Some concepts are shared, but each have unique purposes and constraints that shape the topography of their software.http://nshipster.com/watchkit/
– Edit
Compare load times of the unsecure HTTP and encrypted HTTPS versions of this page.https://www.httpvshttps.com/
– Edit
October saw the company add 26.000 new active users, a continuation of the average 20,000 new users coming on board each month.http://www.forbes.com/sites/benkepes/2014/12/09/digitalocean-raises-50m-but-even-that-cant-explain-the-growth/
I didn't know these guys were so big.
– Edit
With my recent move to HTTPS I wasn’t sure if there were any pages left on my site that had Mixed Content or not. To check this I wrote a little PHP CLI app to scan an HTTPS website for Mixed Content. The script starts crawling at a given URL, and processes the page.https://www.bram.us/2014/12/10/mixed-content-scan-scan-your-https-enabled-website-for-mixed-content/
Nice!
– Edit
Programmers work at night because it doesn’t impose a time limit on when you have to stop working, which gives you a more relaxed approach, your brain doesn’t keep looking for distractions and a bright screen keeps you awake.http://en.codeceo.com/why-programmers-work-at-night.html
Though I keep working at night to a minimum it sounds very familiar. It seems a bit strange but not having a deadline is great for productivity for some types of tasks.
– Edit
Evan Miller makes the case for offering xls-exports instead of csv-exports.
Most people of your website’s users are also Excel users. When they export their data as CSV, they’ll probably just bring it into Excel first to have a look around. You should probably offer an explicit XLS export, and take it seriously.http://www.evanmiller.org/please-offer-an-excel-export-option.html
An xls-file is capable of things that 'll never be possible in csv:
This is how you export all values from a given repository that returns Eloquent models:
Excel::create($pathToFile, function($excel) {
$excel->sheet('The sheet name', function($sheet) {
$sheet->freezeFirstRow();
$sheet->cells('A1:Z1', function($cells) {
$cells->setFontWeight('bold');
$cells->setBorder('node', 'none', 'solid', 'none');
});
$sheet->fromModel($this->yourOwnRepository->getAll());
});
})->export('xls');
The result is an excel-file with the header row frozen and underlined and it's values in bold.
– Edit
Here's a great Laravel package if you want to use the no CAPTCHA reCATCHA that was introduced by Google last week:
https://github.com/anhskohbo/no-captcha
Personally I'd go for a honeypot before resorting to a recaptcha because a honeypot is invisible for users. Here's a good package by Maksim Surguy if you want to go that route:
– Edit
I've used MySQL over the years and it has served me well. I didn't know the default behaviour is a bit messed up. Look at this video for some examples:
Because there's a lot of validation being done by the php-applications I work on, I've yet to run into the problems described above.Though the default configuration has some problems I'm not migrating my current projects from MySQL to something else. But for fresh new projects, I'll consider using PostgreSQL.
If you are considering this as well here's a guide by Chris Fidao (I stumbled upon the video above when reading that guide). If you are in any way interested in running your own server you have to subscribe to his excellent newsletter, Servers for Hackers, and buy the book with the same name.
– Edit
You can clear a beanstalkd queue in Laravel with this Artisan command.
– Edit
Fontastic is a service for creating custom font icons.
They offer hosting of the icons as well so you can manage them in one place.
– Edit
Almost a year ago Igor Wiedler wrote three articles on his blog about the state of functional programming in PHP.
The first article explores iteration. You'll learn to turn this
$admins = [];
foreach ($users as $user) {
if (is_admin($user)) {
$admins[] = $user;
}
}
into this
use function iter\filter;
$admins = filter('project\user\is_admin', $users);
In the second one he explains a very nice way to traverse an associative array. How you currently do it:
$baz = (isset($data['foo']['bar']['baz'])) ? $data['foo']['bar']['baz'] : null;
How you'll do it in the future:
use function igorw\get_in;
$baz = get_in($data, ['foo', 'bar', 'baz']);
The final article shows you a nice syntax to handle objects that return null-values.
All the articles mention libraries that you can use in your code today.
– Edit
Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.http://ivaynberg.github.io/select2/
– Edit
If you've been following the news, you'll have noticed that yesterday Composer got a bit of a speed boost. And by "bit of a speed boost", we're talking between 50% and 90% reduction in runtime depending on the complexity of the dependencies. But how did the fix work? And should you make the same sort of change to your projects? For those of you who want the TL/DR answer: the answer is no you shouldn't.http://blog.ircmaxell.com/2014/12/what-about-garbage.html
– Edit
Google introduced a new method that verifies you are human without you having to solve a riddle.
On websites using this new API, a significant number of users will be able to securely and easily verify they’re human without actually having to solve a CAPTCHA. Instead, with just a single click, they’ll confirm they are not a robot.
It looks like this:

http://googleonlinesecurity.blogspot.nl/2014/12/are-you-robot-introducing-no-captcha.html