This is a quick guide on installing HTTPie for Mac OS X systems. This is also useful if you want the python package management utility pip
. An installed copy of Homebrew is a prerequisite.
brew install httpie
var ngAppElem = angular.element(document.querySelector('[ng-app]') || document); | |
window.$injector = ngAppElem.injector(); | |
window.inject = $injector.invoke; | |
window.$rootScope = ngAppElem.scope(); | |
// getService('auth') will create a variable `auth` assigned to the service `auth`. | |
var getService = serviceName => | |
inject([serviceName, s => window[serviceName] = s]); |
var leak = (function() { | |
var leak = []; | |
var iframe = document.createElement('iframe'); | |
iframe.style = 'display: none;'; | |
document.body.appendChild(iframe); | |
var window = iframe.contentWindow; |
This is a quick guide on installing HTTPie for Mac OS X systems. This is also useful if you want the python package management utility pip
. An installed copy of Homebrew is a prerequisite.
brew install httpie
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows:
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
<?php | |
/** | |
* Created by JetBrains PhpStorm. | |
* User: Marco Pivetta | |
* Date: 16.08.12 | |
* Time: 11:05 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
class CriteriaTest extends \PHPUnit_Framework_TestCase | |
{ |
{ | |
"require": { | |
"monolog/monolog": "1.1.*" | |
} | |
} |
fos_js_routing: | |
routes_to_expose: | |
- "^api_.*" # expose all routes with a name starting with api_ |