Skip to content

Instantly share code, notes, and snippets.

View elventear's full-sized avatar
🧙‍♂️
Conjuring

Pepe Barbe elventear

🧙‍♂️
Conjuring
View GitHub Profile
@elventear
elventear / wait.sh
Created May 7, 2013 14:38
#bash wait on #background jobs and #subshells
#!/bin/bash
# http://jeremy.zawodny.com/blog/archives/010717.html
FAIL=0
echo "starting"
./sleeper 2 0 &
./sleeper 2 1 &
./sleeper 3 0 &
@elventear
elventear / gist:5491822
Last active December 16, 2015 20:19
#reset #git author of #commit
git commit --amend --reset-author
@elventear
elventear / gist:4583467
Last active December 11, 2015 09:58
Use #gremlin #shell on read-only #neo4j #debug #development #shell
// Source: https://groups.google.com/forum/?fromgroups=#!topic/gremlin-users/60NUGlnyCkw
import org.neo4j.kernel.EmbeddedReadOnlyGraphDatabase
db = new EmbeddedReadOnlyGraphDatabase('/var/lib/neo4j/data/graph.db')
g = new Neo4jGraph(db)
@elventear
elventear / gist:3863471
Last active October 11, 2015 13:07
#query #lucene from #gremlin on #neo4j
// Source: https://groups.google.com/forum/#!topic/neo4j/x_US3cIH5wU
index = g.getRawGraph().index()
products = index.forNodes('products')
hits = products.query("name:*foo*")
results = new com.tinkerpop.blueprints.pgm.impls.neo4j.util.Neo4jVertexSequence(hits, g)._().map.toList()