Using Composer with WordPress – at first this sounds a bit hacky, but the result is rather elegant.
Composer Cheat Sheet for developers
I am reading about Composer. And the more I read, the more I like it.
Ferguson broke the news to his studio audience at the 5 p.m. Pt taping of Monday’s edition of “Late Late Show.” In a statement issued by the network he quipped: “CBS and I are not getting divorced, we are ‘consciously uncoupling,’ but we will still spend holidays together and share custody of the fake horse and robot skeleton, both of whom we love very much.”
These are sad news indeed. Of all the late night shows that are easily reachable (so, Jon Stewart is off limits), I enjoyed the “Late Late Show” the most. Gladly, at least, the previous episodes are available on their YouTube channel.
Faker is a PHP library that generates fake data
Have you ever shoved a
<marquee>tag? Pixar gets all the accolades today, but in the 90s this was a serious feat of computer animation. By combining these two tags, you were a trailblazer. A person capable of great innovation. A human being that all other human beings could aspire to.
You were a web developer in the 1990s.
There are more nostalgic examples of how we used to do things back in the day …
FactCheckEU is a fact-checking website that monitors MEPs and other EU politicians ahead of the 2014 European Parliament elections and checks if their numbers are correct.
CakePHP framework comes with the default PagesController which is an awesome out of the box way to build a website of mostly static pages. There is one rather annoying limitation though – no search option. If you need a website of mostly static pages with search functionality, you are out of luck. I spent a good chunk of time Googling (searching, eh?) for a solution and even talking to people in #cakephp IRC channel. The best alternatives, it turned out are listed in this StackOverflow answer:
There is no built in way to search static pages as they are just files on disk.
You have three options
- Build a model to hold the data somewhat like a CMS so you can use mysql search.
- google search for sites
- the more hacky approach of reading the contents of all the pages and using preg_match() or similar on the contents to find matches.
The first option is probably the best depending on your use case. The second option is the easiest if its public facing content. The third option is a horrible idea
Since I need the solution for a public facing website, it looks like I’m gonna go with Google Custom Search Engine option.
I decided to set a couple rules for myself:
- I must write code every day. I can write docs, or blog posts, or other things but it must be in addition to the code that I write.
- It must be useful code. No tweaking indentation, no code re-formatting, and if at all possible no refactoring. (All these things are permitted, but not as the exclusive work of the day.)
- All code must be written before midnight.
- The code must be Open Source and up on Github.
Some of these rules were arbitrary. The code doesn’t technically need to be written before midnight of the day of but I wanted to avoid staying up too late writing sloppy code. Neither does the code have to be Open Source or up on Github. This just forced me to be more mindful of the code that I was writing (thinking about reusability and deciding to create modules earlier in the process).
And he got some very interesting results, not to mention – a whole lotta work done.
While I’m not the biggest fan of productivity boost experiments, this one does resonate with me. I’ve done a similar one when I was learning photography. I decided to take at least one picture every day with my camera (no mobile phones), with no automatic settings. Some days were better, some were worse, but I manage to run it for about four month and I couldn’t believe how much better I got – I was still a noob, but the difference between the first days and the last days was huge! The routine, once you get into it, is a very powerful tool, apparently.
For about a year or so now I’ve been avoiding any side projects, trying to recover from a previous burnout. But now, slowly, I am looking into ways to get me back on tracks. This approach looks interesting enough for me to consider.
logstash is a tool for managing events and logs. You can use it to collect logs, parse them, and store them for later use (like, for searching). Speaking of searching, logstash comes with a web interface for searching and drilling into all of your logs.
It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
logstash is now a part of the Elasticsearch family!