Skip to content

Instantly share code, notes, and snippets.


Pablo Enrici pablen

View GitHub Profile
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..."
pablen / Main.elm
Last active Mar 26, 2022
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 / 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 / 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 /
Last active Jan 11, 2019 — forked from sn1p3r46/
This bash script reboots TP-Link routers
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/
View gist:d0ebfafb56debeb552d8cc0f42359b38
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreifhs74s7tknjlurpyjg3vexbq5ksb3v2tijfyiipljhwzfdzupjfi ✅
Create your profile today to start building social connection and trust online at