Skip to content

Instantly share code, notes, and snippets.

View ayozebarrera's full-sized avatar
⚛️
Reacting

Ayoze Barrera ayozebarrera

⚛️
Reacting
View GitHub Profile
/** @jsx React.DOM */
var SVGComponent = React.createClass({
render: function() {
return this.transferPropsTo(
<svg>{this.props.children}</svg>
);
}
});
@ayozebarrera
ayozebarrera / Confirmation.js
Created December 15, 2015 10:35
A wrapper component that embraces your button passing his click event to the confirm accept buttons.
import React from 'react';
import ReactDOM from 'react-dom';
class ConfirmChild extends React.Component {
constructor() {
super();
this.state = {
isOpen: false
};
this.closeModal = this.closeModal.bind(this);
// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core?
L.TileLayer.Common = L.TileLayer.extend({
initialize: function (options) {
L.TileLayer.prototype.initialize.call(this, this.url, options);
}
});
(function () {

#Tmux Cheat Sheet

Dotfiles: richardkall/dotfiles

##Basic

Command Description
<C-a> Prefix
`` : Command mode
###############################################################################
# EMPEZANDO ###################################################################
###############################################################################
# Configurar email y nombre
git config --global user.name "John Doe"
git config --global user.email "foobarbaz@gmail.com"
# Crear un nuevo repositorio
git init
@ayozebarrera
ayozebarrera / console.js
Created April 7, 2015 11:41
Console functions with different types of data
var externalObj = {key: 'value'};
var items = {
obj: {
'string prop': 'string val',
5: 10,
nested: [[3, [5, 2]]],
'function': function(){return true;},
reference: externalObj
},
@ayozebarrera
ayozebarrera / bower.md
Created March 25, 2015 10:58
How config bower

#How config bower

##Make .bowerrc file

{
  "directory" : "path/to/components"
}

##Iniciamos Bower y configuramos el proyecto.

@ayozebarrera
ayozebarrera / makesvg.css
Created March 23, 2015 09:50
SVG chart generation in JavaScript
#con {
resize:both;
overflow:hidden;
display:inline-block;
width:20em;
height:20em;
padding:0.5em;
}
@ayozebarrera
ayozebarrera / query-qgis.md
Last active August 29, 2015 14:16
Queries for QGIS

Pisos de vegetación

Queries para la filtración de los diferentes pisos de vegetación.

Obtener las features que no pertenecen a los pisos de vegetacion (vegetación azonal)

"VEG_POT" =  "9901" OR  "VEG_POT" =  "9902" OR  "VEG_POT" =  "9909" OR  "VEG_POT" =  "9910" OR "VEG_POT" =  "9917" OR  "VEG_POT" =  "9922" OR  "VEG_POT" =  "9923" OR  "VEG_POT" =  "9924" OR "VEG_POT" = "9925" OR "VEG_POT" = "9935"

Obtener features del piso de vegetación: Zona baja

@ayozebarrera
ayozebarrera / geo.json
Last active August 29, 2015 14:15
ogr2ogr: get a geojson with 4326 projection from a shapefile
ogr2ogr -f GeoJSON -t_srs crs:84 name.geojson name.shp
# -f format_name: GeoJSON (ESRI Shapefile, GML, MapInfo file...)
# -t_srs: Reproject/transform to this SRS on output (crs:84 is WGS84)