Skip to content

Instantly share code, notes, and snippets.

Fran Guijarro franleplant

Block or report user

Report or block franleplant

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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

@franleplant
franleplant / index.js
Last active Jul 28, 2016
Calc avg score from UTN FRD website
View index.js
const strmap = {
"diez": 10,
"nueve": 9,
"ocho": 8,
"siete": 7,
"seis": 6,
"cinco":5,
"cuatro": 4,
"tres": 3,
View a.rs
use std::collections::{BTreeMap, BTreeSet};
type State = String;
type DeltaValue = BTreeMap<char, BTreeSet<State>>;
type Delta = BTreeMap<State, DeltaValue>;
fn main() {
let mut delta: Delta = BTreeMap::new();
let rules = [
(("q0".to_string(), 'a'), "q1".to_string()),
You can’t perform that action at this time.