Skip to content

Instantly share code, notes, and snippets.

// child functions
export default (
<Connect mapStateToProps={mapStateToProps} mapDispatchToProps={mapDispatchToProps}>
{props => (
<WithRouter>
{router => (
<Foo router={router} {...props}/>
)}
</WithRouter>
)}
@hubgit
hubgit / frame.jsonld
Created May 11, 2017 09:40 — forked from anonymous/README.md
JSON-LD Playground:
{
"@type": "http://example.org/vocab#Library"
}
@hubgit
hubgit / create_doc2vec.py
Last active January 9, 2016 21:11 — forked from vierja/create_doc2vec.py
Create Doc2Vec using Elasticsearch (while processing the data in parallel)
from elasticsearch.helpers import scan
from elasticsearch import Elasticsearch
from multiprocessing import Pool
import gensim
import logging
import nltk
import os
import re
import string
import unicodedata
@hubgit
hubgit / app.js
Last active August 29, 2015 13:56 — forked from phoebebright/data.csv
'use strict';
function ready(data){
var nodes = document.querySelectorAll('script[type="text/eval+javascript"]');
Array.prototype.forEach.call(nodes, function(node) {
var script = node.innerHTML.trim();
var figure = document.createElement('figure');
node.parentNode.insertBefore(figure, node);
@hubgit
hubgit / git-delete-remote.sh
Last active December 17, 2015 13:39 — forked from lancerushing/gist:4062845
Delete remote branches in "origin" that have been merged into origin/master
#!/bin/bash
git branch -r --merged origin/master | \
grep origin | \
grep -v '>' | \
grep -v master | \
cut -d "/" -f 2- | \
xargs git push origin --delete