Skip to content

Instantly share code, notes, and snippets.


Jacqui tekiegirl

View GitHub Profile
tekiegirl / EntityFrameworkHack
Created Oct 28, 2013
Getting Entity Framework to recognise the return type of a Stored Procedure that returns a #temp table
View EntityFrameworkHack
IF 1 = 2
cast(null as int) as UserId
,cast(null as nvarchar(250)) as Username
,cast(null as int) as RoleCount
,cast(null as datetime) as UserRevoked
,cast(null as bit) as Locked
,cast(null as bit) as ForcePassChange
,cast(null as varchar(200)) as ClientName
tekiegirl / GetSessionIdCookieName
Created Oct 28, 2013
Progromatically get SessionId Cookie name used in an application
View GetSessionIdCookieName
using System.Configuration;
using System.Web.Configuration;
internal string GetSessionIdCookieName()
SessionStateSection sessionStateSection = (SessionStateSection)ConfigurationManager
return sessionStateSection != null ? sessionStateSection.CookieName : null;
tekiegirl / CheckValid
Created Oct 28, 2013
Get the executing assembly of a web app referencing a class library
View CheckValid
private static bool CheckValid(string controller, string action)
if (!controller.Contains("Controller"))
controller = controller + "Controller";
// Get assembly
Assembly a = GetWebEntryAssembly();
if (a != null)
tekiegirl / ContributorCommunity.adoc
Last active Dec 28, 2015
Initial tests for the Contributor Community graph
View ContributorCommunity.adoc

Contributor Community Graph

Developers using Neo4j are currently working alone when they should be working together, but they don’t know who is working on the same technologies. This graph aims to solve this by linking developers with similar interests, projects and events.

Setup of known data

View fuzzy_match.adoc

Ranked rule-based subgraph matching

In order to rank possible matches by relevence I wish to return a score, with different matches addingg a different value to the score, and a list of the items that matched (a list of strings). More matches the higher the rank should be.

Setup of known data

tekiegirl / merge.adoc
Last active Dec 30, 2015
Does MERGE work the same for relationships as CREATE UNIQUE did?
View merge.adoc
tekiegirl / uniqueId.adoc
Last active Mar 24, 2021
Using the graph to control unique id generation.
View uniqueId.adoc

Using the graph to control unique id generation


This gist was prompted by Nigel Small’s tweet of a query to generate a unique id for a node (and is posted here with his agreement). It inspired me to think about how it could be used in a full example, unrestricted by Twitter’s 140 characters. I have also looked at how we could generate different sets of unique ids for different labels.

Auto-incrementing #Neo4j counter MERGE (x:Counter {name:'foo'}) ON CREATE SET x.count = 0 ON MATCH SET x.count = x.count + 1 RETURN x.count

— Nigel Small (@technige) December 16, 2013
tekiegirl / navigation.adoc
Last active Jun 3, 2019
A neo4j graph gist showing how satellite navigation mapping can be modelled in a graph.
View navigation.adoc

Roads, Nodes and Automobiles

or 'How a sat-nav could use a graph database'

tekiegirl / BabyNames
Last active Aug 29, 2015
Baby Names Graph Gist
View BabyNames
== Baby Names Graph
:neo4j-version: neo4j-2.1
:author: Jacqui Read
:twitter: @tekiegirl
=== Initial Data Setup
View BabyNames2.adoc

Baby Names Graph

Initial Data Setup