This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
- Introduction
- Installing Node.js
- Installing MySQL
- Setting-up the project
| #!/bin/bash | |
| # Author: Chmouel Boudjnah <chmouel.boudjnah@rackspace.co.uk> | |
| # Not officially supported by Rackspace only as a best effort basis :) | |
| # Define yes to make it to copy to url to clipboard (via a shortened url | |
| # service) You need to have the software xclip installed in your system. | |
| COPY_URL_TO_CLIPBOARD=yes | |
| # Containers to ignore in the list | |
| CONTAINERS_TO_IGNORE=".CDN_ACCESS_LOGS" |
| SUMMARY | |
| I like to use kcachegrind for doing profiling on my ruby code. Most of my development | |
| is done on OSX, and while you can install kcachegrind via macports, it takes forever | |
| because it has to build KDE, as well. Much to my surprise, the fine folks who | |
| wrote kcachegrind also made a QT version, qcachegrind. I was able to build this on | |
| OSX without too much effort, only having to install QT and GraphViz. Yippie! | |
| I'm running OSX 10.6.7, with Xcode 4. My default gcc/g++ version is 4.2. I'm sure | |
| it will build just fine on earlier versions of Xcode, but I haven't tested it. |
| #!/bin/sh | |
| # ./bin/behat-ci.sh | |
| project_dir=$(dirname $(readlink -f $0))"/.." | |
| logs_path=${1:-"./build/logs/behat"} | |
| reports_path=${2:-"./build/behat"} | |
| cd $project_dir |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
| /** | |
| * Fancy ID generator that creates 20-character string identifiers with the following properties: | |
| * | |
| * 1. They're based on timestamp so that they sort *after* any existing ids. | |
| * 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
| * 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
| * 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
| * latter ones will sort after the former ones. We do this by using the previous random bits | |
| * but "incrementing" them by 1 (only in the case of a timestamp collision). | |
| */ |
| <?php | |
| namespace AppBundle\EventListener; | |
| use Symfony\Component\HttpFoundation\Response; | |
| use Symfony\Component\HttpKernel\HttpKernelInterface; | |
| use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
| use Symfony\Component\HttpKernel\Event\FilterResponseEvent; |