Lean unit tests with minimal setup
- Fake DOM (Everything works without a real browser)
- Uses ngMocks to inject and mock Angular.js dependencies
- I'm assuming you are already using browserify (but everything works fine without it)
Lean unit tests with minimal setup
$username = $request->request->get('username'); | |
$password = $request->request->get('password'); | |
if(is_null($username) || is_null($password)) { | |
return new Response( | |
'Please verify all your inputs.', | |
Response::HTTP_UNAUTHORIZED, | |
array('Content-type' => 'application/json') | |
); | |
} |
The API we are creating in this gist will follow these rules :
password
Grant Type only (no need for Authorization pages and such).v1.api.example.com
)The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :
sudo add-apt-repository ppa:no1wantdthisname/ppa && apdejt && apti fontconfig-infinality | |
# configuration | |
sudo bash /etc/fonts/infinality/infctl.sh setstyle | |
/etc/profile.d/infinality-settings.sh -> open -> USE_STYLE = [ OSX || DEFAULT || UBUNTU ] |
A collection of articles by AngularJS veterans, sometimes even core committers, that explain in detail what's wrong with Angular 1.x, how Angular 2 isn't the future, and why you should avoid the entire thing at all costs unless you want to spend the next few years in hell.
Reason for this: I'm getting tired of having to explain to everyone, chief of which all the indiscriminate Google Kool-Aid™ drinkers, why I have never believed in Angular, why I think it'll publicly fail pretty soon now (a couple years), and why it's a dead end IMO. This gist serves as a quick target I can point people to in order not to have to parrot / compile the core of the articles below everytime. Their compounded reading pretty much captures 99% of my view on the topic.
This page is accessible through http://bit.ly/angular-just-say-no and http://bit.ly/angularjustsayno, btw.
{ | |
"extends": "standard", | |
"ecmaFeatures": { | |
"jsx": true, | |
"modules": true | |
}, | |
"env": { | |
"browser": true, | |
"node": true | |
}, |
*foreground: #999697 | |
*background: #1b1b1b | |
! black | |
*color0: #1b1b1b | |
*color8: #444444 | |
! red | |
*color1: #683e3e | |
*color9: #7b4e50 |
Open terminal => CTRL+ALT+T | |
Make a folder for your project | |
1. mkdir project | |
2. cd project | |
3. npm init | |
=> fill out all the needed stuff; name, description, whatever |
# eg Webstorm bin/webstorm64.vmoptions | |
-Dswing.aatext=true | |
-Dawt.useSystemAAFontSettings=gasp | |
-Dsun.java2d.xrender=true | |
-Dawt.useSystemAAFontSettings=on |
"use strict"; | |
angular.module("Main").directive("activitycalendar", function () { | |
return { | |
link: function (scope, elm) { | |
var $el = angular.element(elm); | |
function refreshCalendar() { | |
var curCalView = $el.fullCalendar("getView"); | |
var moment = null; |