- 13" Macbook Pro 3.3 GHz i7 (late 2016)
- Microsoft Surface Book (2016)
- Dell up3216q 32" monitor
// https://github.com/quilljs/quill/issues/979 | |
interface NestedElement { | |
content: string; | |
indent: number; | |
classes: string; | |
} | |
export function quillDecodeIndent(text: string) { | |
if (!text || text.length === 0) { |
library(lubridate) | |
library(scales) | |
library(tidyverse) | |
# regulariza o formato da data do tweet, corrige para fuso certo | |
d$created_at <- as.POSIXct(strptime(d$created_at, "%Y-%m-%d %H:%M:%S")) | |
d$created_at <- d$created_at - hours(3) | |
d$dia <- as.POSIXct(strptime(d$created_at, "%Y-%m-%d")) | |
# cria coluna com minuto arredondado |
/** | |
* largestRemainderRound will round each number in an array to the nearest | |
* integer but make sure that the the sum of all the numbers still equals | |
* desiredTotal. Uses largest remainder method. Returns numbers in order they | |
* came. | |
* | |
* @param {number[]} numbers - numbers to round | |
* @param {number} desiredTotal - total that sum of the return list must equal | |
* @return {number[]} the list of rounded numbers | |
* @example |
This is a proposal for a lightning talk at the Reactive 2016 conference. If you like this, star the Gist.
In regular websites, it is common to send multiple events to track user clicks. Single Page Applications change the way you look at metrics. This is a talk about a simple pattern we created at Globo.com to manage a metrics layer for http://globoplay.globo.com. The talk will cover how to track user flow using Google Analytics and other services. We solved the challenge of tying metrics and components, keeping information across pages and having global data. Also some React, React Router and React Side Effects concepts like context, higher order components, history state will be covered.
By @dmvaldman
Functional Reactive Programming (FRP) is generating buzz as an alternative to Object Oriented Programming (OOP) for certain use cases. However, an internet search quickly leads a curious and optimistic reader into the rabbit-hole of monads, functors, and other technical jargon. I’ve since emerged from this dark and lonely place with the realization that these words are mere implementation details, and that the core concepts are far more universal. In fact, the groundwork was laid down many centuries before the first computer, and has more to do with interpretations of reality, than structuring programs. Allow me to explain.
There’s an old thought experiment that goes like this:
title | slug | createdAt | language | preview |
---|---|---|---|---|
Unit testing Angular.js app with node.js, mocha, angular-mocks and jsdom |
unit-testing-angular-js-app-with-node |
2015-07-05T18:04:33Z |
en |
Majority of search result about unit testing Angular.js apps is about how to do it by using test frameworks that run the tests in a real browser. Even though it's great to be able to test your code in multiple platforms, in my opinion it creates a lot of boilerplate code and makes it hard to run the tests in, for instance a CI-server. |
Lean unit tests with minimal setup
npm install -g fusile
General usage: fusile <sourceDir> <mountPoint>
Fusile is a compiling file system proxy. In order to get it to compile your assets you need to install one or more of these precompilers: LiveScript
, babel
, coco
, coffee-script
, dogescript
, less
, marked
, myth
, node-sass
, stylus
, swig
When any of the above precompilers are available in the context of fusile (in your project root or globally installed), fusile will automatically load it and start compiling files with the corresponding file extension when you read the files from the mountpoint.
Components (or modules) talk to each other via events.
# I managed to get the compiled version with patched QT working on ubuntu precise 64bit (12.04 LTS) and thought I'd share my bash history in the hopes it might spare others some trouble shooting. | |
# Also note that this install process takes rather long, you might want to consider running it in a screen or something | |
# you will be needing git if you haven't got it yet | |
sudo apt-get install git-core | |
# as per installation instructions, install dependencies for wkhtmltopdf | |
sudo apt-get install openssl build-essential xorg libssl-dev libxrender-dev | |
# clone the repo | |
git clone git://github.com/antialize/wkhtmltopdf.git wkhtmltopdf |