References:
- http://blog.bekijkhet.com/2012/05/install-teamcity-continuous-integration.html
- https://gist.github.com/ianbattersby/4641450
sudo apt-get update
References:
sudo apt-get update
Only do this if you understand the consequences: all node programs will be able to bind on ports < 1024
sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/node
Important: your node location may vary. Use which node
to find it, or use it directly in the command:
This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.
ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Other options for PDFSETTINGS:
Hoje algo cômico e surreal aconteceu na comunidade FrontEnd Brasil. Algo chocante a ponto de desanimar o mais engajado dos participantes.
Após postar um Gist sobre moment com um código bastante didático, Berger foi rechaçado pelo moderador da comunidade, Jean Carlo Nascimento. Ao notar que o gist era escrito em CoffeeScript, o moderador comentou uma piadinha:
Prefiro usar moment a coffee.
A comunidade não gostou e reagiu, criticando o comentário infeliz e prezando o autor por compartilhar um código útil. Não satisfeito, as agressões sobre o uso de CoffeeScript continuaram.
_ = require 'underscore' | |
registry = require './registry.json' | |
console.log 'Existing packages: ' + Object.keys(registry).length | |
console.log 'Grouped by appType:' | |
groupedByAppType = _.groupBy registry, 'appType' | |
for k, v of groupedByAppType | |
console.log k, v.length |
// View (a template) | |
<p>First name: <input data-bind=”value: firstName” /></p> | |
<p>Last name: <input data-bind=”value: lastName” /></p> | |
<h2>Hello, <span data-bind=”text: fullName”> </span>!</h2> | |
// ViewModel (diplay data… and logic?) | |
var ViewModel = function(first, last) { | |
this.firstName = ko.observable(first); | |
this.lastName = ko.observable(last); |
// View (a template) | |
<div ng-controller=”HelloController as hello”> | |
<label>Name:</label> | |
<input type=”text” ng-model=”hello.firstName”> | |
<input type=”text” ng-model=”hello.lastName”> | |
<h1>Hello {{hello.fullName()}}!</h1> | |
</div> | |
// Controller | |
angular.module(‘helloApp’, []) |
var Hello = React.createClass({ | |
render: function() { | |
return <div>Hello {this.props.name}</div>; | |
} | |
}); | |
React.render( | |
<Hello name=”World” />, | |
document.getElementById(‘container’) | |
); |
var Hello = React.createClass({displayName: "Hello", | |
render: function() { | |
return React.createElement("div", null, "Hello ", this.props.name); | |
} | |
}); | |
React.render( | |
React.createElement(Hello, {name: "World"}), | |
document.getElementById('container') | |
); |
var CommentList = React.createClass({ | |
render: function() { | |
var commentNodes = this.props.data.map(function (comment) { | |
return ( | |
<Comment author={comment.author}> | |
{comment.text} | |
</Comment> | |
); | |
}); | |
return ( |