How to Lie with Data Visualization
7 backbone.js mistakes you must fix today -- a list not only restricted to backbone!
<?php | |
class MyController | |
{ | |
public function webserviceAction($some, $thing) | |
{ | |
$message = array( | |
'type' => 'webservice', | |
'some' => $some, | |
'thing' => $thing, |
<?php | |
class CamelCaseTransformer | |
{ | |
public function onV1ApiResponse(Req $request, Res $response) | |
{ | |
$this->camelize($response->getContent()); | |
} | |
// ... |
services: | |
api_response.transformer_handler.v0: | |
class: "Namshi\\..\\TransformerHandler" | |
arguments: | |
registry: @api_response.transformer_registry | |
neededTransformers: [jsonp] | |
api_response.transformer_handler.v1: | |
class: "Namshi\\..\\Transformation\\TransformerHandlerChain" | |
arguments: |
<?php | |
class ApiController | |
{ | |
/** | |
* @Route("/{version}/customers/{id}") | |
*/ | |
public function getCustomerAction($version, $id) | |
{ | |
// ... |
location ~ '^/v(\d{1,2})/(.*)' { | |
proxy_pass http://127.0.0.1/$1/$3; | |
proxy_set_header Api-Version $2; | |
} |
<?php | |
namespace My\Namespace; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpKernel\HttpKernelInterface; | |
class CacheMiddleware implements HttpKernelInterface | |
{ |
minimal: | |
Cache-Control: public, max-age=60, s-maxage=60 | |
minimal-private: | |
Cache-Control: private, max-age=60 | |
aggressive: | |
Cache-Control: public, max-age=60, s-maxage=60 | |
no-go: | |
Cache-Control: no-store, no-cache, must-revalidate, max-age=0 | |
Pragma: no-cache |
npm ERR! publish Failed PUT 502 | |
npm ERR! SyntaxError: Unexpected token < | |
npm ERR! <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> | |
npm ERR! <html><head> | |
npm ERR! <title>502 Bad Gateway</title> | |
npm ERR! </head><body> | |
npm ERR! <h1>Bad Gateway</h1> | |
npm ERR! <p>The proxy server received an invalid | |
npm ERR! response from an upstream server.<br /> |