This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExpoPushHelper | |
{ | |
public class MyWebClient : WebClient | |
{ | |
protected override WebRequest GetWebRequest(Uri address) | |
{ | |
HttpWebRequest request = base.GetWebRequest(address) as HttpWebRequest; | |
request.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip; | |
return request; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void dumpAndLoadTo(String targetPath) throws IOException, InterruptedException { | |
// I first tried something like this: | |
// neo4j-shell -path outDir -c "DUMP MATCH n RETURN n;" | neo4j-shell -path targetPath -file - | |
// but performance was horrible upon import. | |
// See http://stackoverflow.com/questions/28246416/neo4j-export-import-data . | |
logger.info("Loading to db " + targetPath); | |
GraphDatabaseService dbSrc = getDb(); | |
GraphDatabaseService dbDest = getDb(targetPath); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using Lucene.Net.Analysis; | |
using Lucene.Net.Analysis.Standard; | |
using Lucene.Net.Analysis.Tokenattributes; | |
using Lucene.Net.Util; | |
using Raven.Abstractions.Indexing; | |
using Raven.Client.Linq; | |
using Raven.Database.Indexing; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using Lucene.Net.Analysis; | |
using Lucene.Net.Analysis.Standard; | |
using Lucene.Net.Analysis.Tokenattributes; | |
using Raven.Abstractions.Indexing; | |
using Raven.Client; | |
using Raven.Client.Indexes; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace RavenApp | |
{ | |
using System.Linq; | |
using Raven.Client; | |
using Raven.Client.Document; | |
using Raven.Client.Indexes; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace RavenApp | |
{ | |
using System.Linq; | |
using Raven.Client; | |
using Raven.Client.Document; | |
using Raven.Client.Indexes; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Given(typeof(the_entity_is_available))] | |
public class When_entity_is_on_hold : SpecsFor<Entity> | |
{ | |
public When_entity_is_on_hold(Type[] contexts) : base(contexts) { } | |
protected override void InitializeClassUnderTest() | |
{ | |
SUT = new Shared().CreateEntity(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target name="BackupRavenDb"> | |
<exec program="Raven.Backup" basedir="${BackupToolPath}" pidproperty="batch1.pid" spawn="true" > | |
<arg value="--url=http://localhost:8080" /> | |
<arg value="--dest=${tempDirectory}${databaseName}" /> | |
</exec> | |
<waitforexit pid="${batch1.pid}" /> | |
<zip zipfile="${tempDirectory}${databaseName}.zip"> | |
<fileset basedir="${tempDirectory}${databaseName}"> | |
<include name="*.*" /> | |
</fileset> |