Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am franleplant on github.
  • I am flpremind (https://keybase.io/flpremind) on keybase.
  • I have a public key ASBE5mY-xGiOFD2B31ss8_TT94sUXjuctEAJ4XJsYHVlgAo

To claim this, I am signing this object:

@franleplant
franleplant / homework.hs
Created July 27, 2021 02:48
Plutus pioneer program week04 homework solution
{-# 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 July 11, 2021 17:09
Plutus Pioneer program: lecture 2, homework 2 annotated
{-# 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 June 4, 2018 23:13
Sintaxis notas de TP
  • No permitir input ni ningun tipo de input interactivo
@franleplant
franleplant / index
Created July 1, 2017 22:37
server perf case study
# 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
var a = 2;
@franleplant
franleplant / index.js
Created January 26, 2017 20:47
HOC dont remove
function toClass(Component) {
return ClassWrapper extends React.Component {
render() {
return <Component {...this.props} />
}
}
}
@franleplant
franleplant / README.md
Last active January 3, 2017 15:42
On React Native performance

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

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
class Form extends React.Component {
constructor(props) {
this.state = {
name: '',
email: ''
}
}
handleNameChange(e) {
this.setState({