Skip to content

Instantly share code, notes, and snippets.

View xagronaut's full-sized avatar

Jeffrey A. Miller xagronaut

View GitHub Profile
@xagronaut
xagronaut / 1_Neo4jFromDbSchemaMetadata.linq
Last active May 2, 2016 12:56
LINQPad Scripts to create CYPHER queries from database metadata extracted from Microsoft SQL Server. They should be executed in the order indicated at the beginning of the filename. You'll need to point to your own database connection in LINQPad. Make sure to check "Include System Views and SPs" in your connection.
<Query Kind="Statements">
</Query>
string.Format("// Add database schemas\nUNWIND [\n\t{0}\n] AS item" + @"
MERGE (db:Database {{ name: item[0] }})
MERGE (sc:DbSchema {{ name: item[1] }})
MERGE (ow:DbAccount {{ name: item[2] }})
MERGE (db)-[:CONTAINS]->(sc)
MERGE (ow)-[:OWNS]->(sc)
RETURN DISTINCT db, ow, sc;
@xagronaut
xagronaut / addqrcode.html
Last active August 29, 2015 14:27
Bookmarklets - including "Add QR code" for the current page for printing or sharing over-the-shoulder
<html>
<head>
<title>Add QR Code - by Jeffrey A. Miller</title>
<!-- the bookmarklet logic is mine; the formatted bookmarklet link was produced with help from
Bookmarklet Creator with Script Includer
http://mrcoles.com/bookmarklet/
It's a very awesome tool! Check it out!
-->
@xagronaut
xagronaut / BulkApplyTfsWorkItemTag.js
Created January 16, 2015 00:06
A short self-contained JavaScript snippet (IIFE) to apply a tag to multiple TFS Work Items through the TFS Web Access interface. If you don't have a version of TFS that allows bulk application of tags, this can help.
// Author: Jeffrey A. Miller (@xagronaut), 01/15/2015
// License: Apache 2.0
//
// Description: Apply a custom tag to multiple TFS Work Items systematically
//
// Notes:
// * Navigate to a TFS query page [YourTfsServer]:8080/tfs/[TfsCollection]/[TfsProject]/_workItems
// * Identify the Work Item IDs you want to update and edit the array at the end of this code snippet
// * This code should be executed in your browser's script console (tested in Chrome)
//