Skip to content

Instantly share code, notes, and snippets.

View WilliamDoman's full-sized avatar

William Doman WilliamDoman

  • Ember Consulting Group
  • Colorado Springs, Colorado
View GitHub Profile
@WilliamDoman
WilliamDoman / ConsoleApplication1.cs
Last active January 11, 2025 14:37
Convert PDF to image and embed into dicom file
using Dicom;
using Dicom.Imaging;
using Dicom.Imaging.Codec;
using Dicom.IO.Buffer;
using Ghostscript.NET;
using Ghostscript.NET.Rasterizer;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
@WilliamDoman
WilliamDoman / PhantomJs.js
Last active August 29, 2015 13:56
PhantomJs.js Usage: Phantomjs.exe phantomJs.js htmlRunner.html
// Found and influenced by the internets
console.log('Loading a web page');
var page = new WebPage();
//This was tricky, this is the way to open LOCAL files
//var url = "file://localhost/Users/danmerino/test/teamcity_reporter.html";
//var url = "file://localhost/Ember.MIS/Ember.WebRole/Scripts/app/test/SpecRunner.RequireJS.html";
console.log("Phantom Argument: " + phantom.args[0]);
@WilliamDoman
WilliamDoman / gist:6748027
Created September 29, 2013 00:15
teamcity 8.x database build for Azure Web
/****** Object: Table [dbo].[working_server] Script Date: 09/28/2013 17:34:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[working_server](
[starting_code] [bigint] NOT NULL,
@WilliamDoman
WilliamDoman / teamcity 8.x schema modificaitons for azure sql
Created September 20, 2013 19:39
Adding clustered index pk to all tables of teamcity 8.x schema to work on azure sql. I installed teamcity on my local up to the accept license page, modified the database with this script and exported it with azure migration tools.
IF EXISTS(SELECT 1 FROM sys.Tables WHERE object_id = OBJECT_ID(N'dbo.working_server'))
AND NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'dbo.working_server') AND name = N'pkid')
BEGIN
ALTER TABLE working_server ADD pkid [bigint] IDENTITY(1,1) NOT NULL;
ALTER TABLE working_server ADD CONSTRAINT working_server_pk PRIMARY KEY CLUSTERED (pkid ASC)
END
GO