Skip to content

Instantly share code, notes, and snippets.

var angular = require('angular');
// We can also make a TodoStore
var _todoState = {
todos: [
{ value:'finish example', created_at: new Date() },
{ value:'add tests', created_at: new Date() }
]
};
// 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!"

Interesting part (unmounting & API) is at the end if you're not interested in the rest =).

Stress Tests

This animation proposal is just an attempt. In case it doesn't work out, I've gathered a few examples that can test the power of a future animation system.

  1. Parent is an infinitely spinning ball, and has a child ball that is also spinning. Clicking on the parent causes child to reverse spinning direction. This tests the ability of the animation system to compose animation, not in the sense of applying multiple interpolations to one or more variables passed onto the child (this should be trivial), but in the sense that the parent's constantly updating at the same time as the child, and has to ensure that it passes the animation commands correctly to it. This also tests that we can still intercept these animations (the clicking) and immediately change their configuration instead of queueing them.

  2. Typing letters and let them fly in concurrently. This tests concurrency, coordination of an array of ch

Interesting part (unmounting & API) is at the end if you're not interested in the rest =).

Stress Tests

This animation proposal is just an attempt. In case it doesn't work out, I've gathered a few examples that can test the power of a future animation system.

  1. Parent is an infinitely spinning ball, and has a child ball that is also spinning. Clicking on the parent causes child to reverse spinning direction. This tests the ability of the animation system to compose animation, not in the sense of applying multiple interpolations to one or more variables passed onto the child (this should be trivial), but in the sense that the parent's constantly updating at the same time as the child, and has to ensure that it passes the animation commands correctly to it. This also tests that we can still intercept these animations (the clicking) and immediately change their configuration instead of queueing them.

  2. Typing letters and let them fly in concurrently. This tests concurrency, coordination of an array of ch

Moving to ES6 from CoffeeScript

I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.

In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.

While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.

Punctuation

Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio

@fredericksilva
fredericksilva / fml.jsx
Last active August 29, 2015 14:21 — forked from c7tincu/fml.jsx
// You’d expect this one…
render() {
return (
<button { ...this.props } className={ this.cn + (this.props.className ? ' ' + this.props.className : '') }>
{ this.props.children }
</button>
);
}

LaterPay is seeking a Front-End Engineer

Who we are

With LaterPay, we want to change the way people buy and sell digital content on the Internet. Why? Because we believe paying for digital content should be fast, convenient, and fair. And because we think you should be able to buy the exact piece of content you want.

We want to create a great software product which influences and changes the way people use paid content of any kind on the Internet. The usage of paid content should be as easy and convenient as going out to dinner: you are served first and pay later.

Javascript

	Como é o funcionamento de escopo 
		[window | var,function | this | 'use strict';]

	Como controlar o código 
		[closures | classe(privado, constante, publico) | singleton]
		
 closures &gt;&gt; IIFE - Immediately Invoked Function Expressions

Links úteis

  • A Rant about Estimation – When Will We Stop Being Crazy

  • InfoQ BR

    • Fuja da escravidão antes que ela te alcance - Nesta palestra, Vinícius Teles nos fala a respeito da realidade de muitos trabalhadores que possuem vidas estáveis, porém repletas de frustrações advindas de suas rotinas e carreiras aparentemente seguras. Vinícius trata do empreendedorismo, com dicas para profissionais de tecnologia que buscam atingir não apenas a estabilidade financeira, mas também a plena satisfação profissional e pessoal.

    • Agile Brazil 2012

'use strict';
/**
* ui-ladda
*
* To use, simply use normal Ladda classes and attributes and pass a model to ui-ladda. You can
* use truthy or falsey values, or pass decimals from 0 to 1 to show the progress bar animation.
*
*
* @param uiLadda (mixed): Sets wether or not to show the ladda loading