Skip to content

Instantly share code, notes, and snippets.

View douglasnomizo's full-sized avatar
👨‍💻
Working from home

Douglas Nomizo douglasnomizo

👨‍💻
Working from home
View GitHub Profile
@douglasnomizo
douglasnomizo / options.scala
Last active May 12, 2016 15:45
listCustom.scala.html
// Option 1
@defining(
(for {
custo <- cotacaoItem.custo
aliquotaSts <- custo.custoIcms.percentualAliquota
aliquotaFornecedor <- cotacaoItem.produto.percentualAliquotaIcms
cssClass <- if (aliquotaFornecedor.equals(aliquotaSts)) {Some("")} else {None}
} yield { cssClass }) getOrElse { "red" }
) { cssClass =>
@douglasnomizo
douglasnomizo / js-frontend-resources.md
Last active July 17, 2017 15:46 — forked from diegopacheco/js-frontend-resources.md
Frontend / JavaScript Resources
// This Gist doesn't work with Graphql because of the deep nature of "selections" object
import { get } from 'lodash'
const memoizedResults = {}
export default (serializer: string, fn: Function): Function => async (
...args: Array<any>
): Promise<Object> => {
const [serializable, selections] = args
const identifier = get(serializable, 'id', get(serializable, 'uid'))