Skip to content

Instantly share code, notes, and snippets.

View jalchr's full-sized avatar

Jalal EL-SHAER jalchr

  • EdenGate
View GitHub Profile
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;
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;
@jalchr
jalchr / gist:589c6d492d0676ff774e
Created March 20, 2016 21:49
copy all nodes from one database to another
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);
@jalchr
jalchr / Expo_Push_Notifications_Helper.cs
Created May 11, 2019 08:48 — forked from danparker276/Expo_Push_Notifications_Helper.cs
Expo.io Push Notifications Send Through C#
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;
}