Moving our VCS to GitHub is the best decision we’ve made in the last year. The benefits are huge, the drawbacks are minor. We now have 16 closed-source repositories hosted on our GitHub organization, plus a few open-source ones that don’t count for the billing. Read on for more details about our GitHub switch.
Read the rest of this post »
Twitter Bootstrap offers a neat plugin called Tabs, to add "quick, dynamic tab and pill functionality for transitioning through local content". The problem is that this plugin doesn't support back button navigation. In other terms, if you switch tabs and then go to another page, a click on the back button of your browser brings you back to the first open tab, not the last open one.
Yuck.
Unfortunately, the author of the plugin doesn't want to support this, as it's impossible to implement in a cross-browser way.
But if you don't mind leaving behind all the IE7 users and go the HTML5 way - for instance for a backend interface with limited access - then it's pretty easy to implement.
Read the rest of this post »
Faker, the PHP fake data generator, already knows how to populate a database using an ORM. As explained in an earlier post, the metadata provided to the ORM is often sufficient to qualify the formatter required for each column. So for instance, to populate 3 records in an author table with first_name, last_name, date_of_birth, and email columns, using the Propel ORM all it takes is the following code:
The \Faker\ORM\Propel\Populator class guesses the formatters to use for each column based on their name and/or column type.
However, if you look carefully at the generated data, it's not consistent.
Read the rest of this post »
Uptime, the remote monitoring application that generates gorgeous reports about your sites availability and responsiveness, continues to evolve.
The latest version, tagged v1.2, offers https and udp checks, allows to pause a check, and is even easier to extend. The complete changelog is available on GitHub.
Read the rest of this post »
Just like PHP, JavaScript supports Exceptions - only they're called Errors. However, due to the asynchronous nature of Node.js, the classic try/catch strategy doesn't work. To catch asynchronous errors, Node strongly encourages a particular signature for callback functions. I'll explain all that shortly, but now I have a confession to make.
Sometimes Things Go Wrong
I don't eat meat. It's not because I like animals too much - I don't believe chickens have a soul.
Read the rest of this post »
Too broke to pay Pingdom a lot of money to monitor more than 5 sites? Tired of configuring PRTG for days and not getting a usable chart? Obliged to aggregate QoS data from several websites to produce an overall indicator? Do you have specific requirements that no existing website monitoring solution offer, but that you could hack into an open-source application?
Then Uptime is for you. Easy to setup, capable of handling thousands of checks, supporting slave servers and extensible through plugins, Uptime provides reports about availability, responsiveness, and response time. Oh, and in addition to a gorgeous web interface, Uptime provides a REST API to integrate with your own applications.
See for yourself in this demo video:
Read the rest of this post »
Thanks to the efforts of kind volunteers, you can now generate fake data in Bulgarian, Czech, English for the UK and the USA, French, Italian, Polish, and Russian.
If you would like to contribute a new localization for Faker, fork the repository, look at the existing localization, and send a PR - it's very easy.
I would like to thank the 175,246,743 developers who downloaded and used Faker in their projects:
Болеслав Сергеевич Кузьмин, Sig. Azue Rizzi, Ms. Myrtie Heidenreich, Trent Turcotte, Jagoda Borowski, Toni Skiles, Третьяков Матвей Игнатов, Violet O'Reilly, Агафонов Давид Трофимов, Jamison Moore, Maiya Hodkiewicz, Евгений Андреевич Калинин, Карпов Фёдор Кононов, Vern Collier Jr., Rosario Huels, Richard Lebsack, Orie Boyer DVM, Харалан Бумов, Sig. Luigi Conti, Яков Алексеевич Власов, Никонов Филипп Горбунов, Марк Щонов, Сава Дмитриевич
Read the rest of this post »
PHP knows how to group classes under a common namespace, and to create redistributable packages using PEAR. Node.js is also very good at organizing code into modular and reusable sets, but there are key differences. I'll explain them shortly, but before I'd like to talk about dolls.
The Doll Problem
My 4-year old daughter was recently offered a second-hand doll set, including 4 dolls, various clothes, furniture, a pony, and a strawberry house. She loves to dress and undress the dolls, and I'm glad to see her learning how to do that perfectly - much better than she knows how to dress herself.
Read the rest of this post »
For a PHP developer, asynchronicity is the most puzzling aspect of the Node.js runtime. It's simply a new way to write programs. And once you pass the first learning steps, event-driven programming opens a world of possibilities PHP programmers would never dream of. I'll try to explain you how it works, but first, let's talk about pasta.
A Simple Pasta Recipe
I love good pasta. But it's very easy to cook bad pasta, so I have a motto: Do Not Eat Pasta Cooked by People You Don't Trust. Since you're a person I trust, I'll give you a simple recipe that you can't screw up, so that when we meet in real life, we can eat together.
The recipe is spaghetti with fresh tomato sauce.
Read the rest of this post »
|