Skip to content

Instantly share code, notes, and snippets.

@franleplant
franleplant / homework.hs
Created Jul 27, 2021
Plutus pioneer program week04 homework solution
View homework.hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
module Week04.Homework where
import Data.Aeson (FromJSON, ToJSON)
@franleplant
franleplant / homework2.hs
Created Jul 11, 2021
Plutus Pioneer program: lecture 2, homework 2 annotated
View homework2.hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
@franleplant
franleplant / index.md
Created Jun 4, 2018
Sintaxis notas de TP
View index.md
  • No permitir input ni ningun tipo de input interactivo
@franleplant
franleplant / index
Created Jul 1, 2017
server perf case study
View index
# Control: Google
wrk -t12 -c400 -d30s http://google.com
Running 30s test @ http://google.com
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 519.53ms 204.18ms 2.00s 92.92%
Req/Sec 45.19 25.95 181.00 73.51%
14840 requests in 30.10s, 6.77MB read
@franleplant
franleplant / index.js
Created Jan 26, 2017
HOC dont remove
View index.js
function toClass(Component) {
return ClassWrapper extends React.Component {
render() {
return <Component {...this.props} />
}
}
}
@franleplant
franleplant / README.md
Last active Jan 3, 2017
On React Native performance
View README.md

On React Native performance

This is the post-mortem report about the performance problems found mostly in Android but also, in a lesser extend in iOS.

__DEV__ = false

This has a huge impact in the performance. By my measures, about 4x times faster. So be sure to that the app is

View index.js
class MyComp extends React.Component {
render() {
// copy props shallowly, you can use other technics such as lodash cloneDeep, et al
// Why do this? because props are inmutable
let props = Object.assign({}, this.props);
delete props.unwantedProp1
...
delete props.unwantedPropN
// You can also achieve all this with lodash.omit
View react-reusable-form.js
class Form extends React.Component {
constructor(props) {
this.state = {
name: '',
email: ''
}
}
handleNameChange(e) {
this.setState({
View index.md

Introduccion a React (español)

Introduccion

...

Nota es2015

Vamos a estar usando indiscriminadamente conceptos de es2015, si alguien no sabe algo me lo pregunta y lo discutimos