Skip to content

Instantly share code, notes, and snippets.

Pablo Enrici pablen

Block or report user

Report or block pablen

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
pablen / .gitconfig
Last active Feb 4, 2019
Globally set git to sign commits. These lines must be present in your ~/.gitconfig
View .gitconfig
gpgsign = true
program = /Applications/
pablen /
Last active Jan 11, 2019 — forked from sn1p3r46/
This bash script reboots TP-Link routers
pablen / PubSub.js
Created Jan 13, 2018
React PubSub pattern
View PubSub.js
import React, { Component } from 'react';
import PubSub from 'pubsub-js';
class App extends Component {
state = { show: true };
render() {
return (
<div className="App">
<button onClick={() => this.setState(state => ({ show: ! }))}>
{ ? 'Hide panel' : 'Show panel'}
pablen / day4.elm
Created Dec 4, 2017
Advent of Code. Day 4. Part 2.
View day4.elm
module Main exposing (..)
import Html exposing (text)
import Set
input : String
input =
"""pphsv ojtou brvhsj cer ntfhlra udeh ccgtyzc zoyzmh jum lugbnk
{-- more lines... --}
pablen / Main.elm
Last active Jan 24, 2019
DOM mutation observer helper that will run a hook when a DOM node matching a selector is mounted or unmounted. This pattern is particularly useful for working with external JS libraries in your Elm apps, using minimal amount of code. The helper leverages the MutationObserver API (
View Main.elm
-- Somewhere in you Elm app you can add editor by adding an empty node with the correct attributes.
-- The JS library will be initialized and destroyed automatically!
view : Model -> Html Msg
view model =
div []
[ div
[ attribute "data-ace" ""
, attribute "data-ace-theme" "monokai"
, attribute "data-ace-mode" "javascript"
pablen / AsyncContent.js
Last active Sep 24, 2015
Carga de contenido adicional asincrónica y condicional en base al ancho del viewport.
View AsyncContent.js
(function(window, document, undefined){
"use strict";
var config = {
selector : "[data-asynccontent-url]",
urlAttr : "data-asynccontent-url",
thrAttr : "data-asynccontent-threshold",
loadTxtAttr : "data-asynccontent-loadtxt",
defaultLoadTxt : "Obteniendo contenido..."
You can’t perform that action at this time.