Skip to content

Instantly share code, notes, and snippets.

View if6was9's full-sized avatar

Rob Schoening if6was9

View GitHub Profile

Keybase proof

I hereby claim:

  • I am if6was9 on github.
  • I am robschoening (https://keybase.io/robschoening) on keybase.
  • I have a public key ASD6XutNzM3HQFgOn0I8q3Z0O-yD-4jEwWErKKqIBMTotgo

To claim this, I am signing this object:

@if6was9
if6was9 / MergeEdge.java
Last active September 13, 2018 03:02
merge edges between vertices
Edge edge = graph.traversal()
.V().hasLabel("Person").has("name","Rob").as("p")
.V().hasLabel("Dog").has("name","Homer").as("d")
.coalesce(
__.inE( "HAS" ).where(__.outV().as("p")) ,
__.addE("HAS").from("p"))
.tryNext().get();
@if6was9
if6was9 / docker-proxy.sh
Created September 7, 2017 04:55
set up a TCP->Unix Domain Proxy
#!/bin/bash
cat <<EOF
In another shell, set the following env var:
export DOCKER_HOST=tcp://localhost:2376
EOF
socat -v -ls TCP-LISTEN:2376,reuseaddr,fork UNIX-CLIENT:/var/run/docker.sock
#!/bin/bash
$ ./gradlew installNeo4j
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
:installNeo4j
downloading neo4j...this could take a minute or two...
untarring neo4j...
starting neo4j...
Starting Neo4j Server...WARNING: not changing user
process [94256]... waiting for server to be ready..... OK.
http://localhost:7474/ is ready.
@if6was9
if6was9 / cycher-cheatsheet.txt
Last active August 29, 2015 14:04
cypher cheatsheet
Find node by ID
----------------
match (n) where id(n)=1 return n;
Find all nodes by label
=======================
match (m:Person) return m;

Keybase proof

I hereby claim:

  • I am if6was9 on github.
  • I am robschoening (https://keybase.io/robschoening) on keybase.
  • I have a public key whose fingerprint is 0D28 5EEA 286A FE22 9713 07BE 3176 4A9C 7E27 30B7

To claim this, I am signing this object:

@if6was9
if6was9 / puppet_cribnotes
Created January 28, 2013 00:18
simple puppet commands
# To run puppet master in the foreground
puppet master --no-daemonize --verbose
# To run puppet agent in the foreground
puppet agent --no-daemonize --verbose --debug -o test
@if6was9
if6was9 / gist:4649897
Created January 27, 2013 19:22
random short identifiers
dd if=/dev/urandom bs=1k count=2 | shasum | cut -c 1-6
@if6was9
if6was9 / update_jdk_alternatives
Created January 11, 2013 19:18
/etc/alternatives updates for new JDK
export NEW_JDK_HOME=/usr/local/jdk1.6.0_38
export NEW_JDK_PRIORITY=2
alternatives --install "/usr/bin/java" "java" "$NEW_JDK_HOME/bin/java" $NEW_JDK_PRIORITY
alternatives --install "/usr/bin/javac" "javac" "$NEW_JDK_HOME/bin/javac" $NEW_JDK_PRIORITY
echo $NEW_JDK_PRIORITY | alternatives --config java
echo $NEW_JDK_PRIORITY | alternatives --config javac