Skip to content

Instantly share code, notes, and snippets.

View nielsjansendk's full-sized avatar

Niels Jansen nielsjansendk

View GitHub Profile
@nielsjansendk
nielsjansendk / gist:f3cb83466b0f34c48369ca226723f26a
Created July 19, 2016 11:02
How to use apoc.periodic.iterate to delete all nodes and relations in a neo4j graph
call apoc.periodic.iterate("MATCH (n) return n", "DETACH DELETE {n}", {batchSize:1000})
yield batches, total return batches, total
Rails 3: If you want to use the file db/seeds.rb to seed you test database before running your specs do this:
Create a file called spec.rake in lib/tasks/
In this file you stick:
task :spec => ["db:test:prepare", "db:seed"]
and that will do the trick
First, install macports if you haven't already.
sudo port install postgresql84 postgresql84-server
sudo mkdir -p /opt/local/var/db/postgresql84/defaultdb
sudo su postgres -c '/opt/local/lib/postgresql84/bin/initdb -E UTF8 -D /opt/local/var/db/postgresql84/defaultdb'
sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql84-server.plist