Skip to content

Instantly share code, notes, and snippets.

@stevecooperorg
stevecooperorg / d3dragdrop.js
Created September 4, 2013 12:15
An (rather poor) example of drag-drop between separate SVG elements
(function() {
var MasterCanvas = function (selector, options) {
var self = this;
var svg = d3
.select(selector)
.append("svg:svg")
.attr("width", options.width)
.attr("height", options.height)
.classed("master-canvas", true);
@stevecooperorg
stevecooperorg / index.html
Last active December 23, 2015 11:39
Example Mettle skill graph
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style>
@import url(../style.css?20120521);
#chart {
height: 500px;
@stevecooperorg
stevecooperorg / fragment-of-projectfile.csproj
Created February 21, 2014 13:01
example fragment showing how to include the typescript target and override the compiler path
<Fragment>
<PropertyGroup>
<TypeScriptCompilerDir>$(SolutionDir)Libraries\MSBuild\TypeScript\v$(MSBuildToolsVersion)\TypeScript</TypeScriptCompilerDir>
<TscToolPath>$(SolutionDir)Libraries\SDKs\TypeScript</TscToolPath>
</PropertyGroup>
<Import Project="$(TypeScriptCompilerDir)\Microsoft.TypeScript.targets" />
</Fragment>
@stevecooperorg
stevecooperorg / XsltTools.cs
Created February 24, 2014 12:17
XsltTools
namespace XmlStuff
{
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Xsl;
internal class XsltTools
{
public string Transform(string xsltContent, string inputXml)
@stevecooperorg
stevecooperorg / SharingVariableTest.cs
Created April 1, 2014 20:42
Using initialized variables
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
namespace GoogleTest
{
[TestClass]
public class SharingVariableTest
{
@stevecooperorg
stevecooperorg / gist:9fb7b55eb069ce100655
Last active August 29, 2015 14:01
Scooby Doo Vs The Illuminati
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConspiracyTheory
{
class ScoobyDooVsTheIlluminati
{
@stevecooperorg
stevecooperorg / Program.cs
Created October 29, 2014 15:35
Blinky lights for the build yak (2014-10-29 15:34)
// uses .Net Micro Framework 4.2, runs on Netduino 2 Plus.
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
@stevecooperorg
stevecooperorg / ReplaceTabsWithParagraphs.vba
Created October 30, 2014 21:37
ReplaceTabsWithParagraphs VBA macro
Sub ReplaceTabsWithParagraphs()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^t"
.Replacement.Text = "^v"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HelloStuff
{
class Program
{
@stevecooperorg
stevecooperorg / Program.cs
Created November 20, 2014 13:23
C# lesson 1a
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HelloPerson
{
class Program
{