There are two videos available: PHP Web Services and Intermediate PHP (subtitle: a bunch of things Lorna thinks will make developers’ lives and applications better!), you can click through (disclaimer: affiliate links!) to get more information and a detailed chapter outline for each course. I hope that either or both of them will be useful to you. Continue reading
My ffmpeg Cookbook
Using Phing with Travis CI
Quickly add Amazon Cloudfront as a CDN
View Only Headers with Curl
HEAD
request changes the output I get, so I really do want to GET
and then only see the headers.
Handily, when you use the -v
verbose flag with curl, it sends the output to stdout as usual, but the extra information including the headers goes to stderr. This means that I can therefore view the headers only throwing away stdout completely:
curl -v -s http://awesome-site.com 1> /dev/null
(you need the -s
to stop curl from “helpfully” printing progress bars as well)
Video: Git Remotes and Tracking Branches
I also blogged about the tracking branches in a bit more detail if you’re interested.
Understanding Tracking Branches in Git
Some branches in git (such as your origin/master branch) will usually track the remote branch that they are related to. But what if you want to create a relationship between local and remote branches? Or stop them from tracking? Here’s some pointers Continue reading
Running Pull Request Builds with Jenkins
What Got You Involved in Open Source?
Logging to Stdout with Monolog
I’m a huge fan of Monolog so I grabbed that, but it wasn’t immediately obvious which of the many and varied options I would need for this fairly simple addition. It turns out that the right thing to use is the ErrorLogHandler
, so now my code looks like this:
<?php require "vendor/autoload.php"; $logger = new \Monolog\Logger("log"); $logger->pushHandler(new \Monolog\Handler\ErrorLogHandler()); $logger->addInfo("Something happened");
And the output is neatly in lines like this:
[2014-06-05 17:00:47] log.INFO: Something happened [] []
You can do a lot of different things with Monolog, but since I had to look up this simplest of all options, I thought I’d share.