Skip to content

Instantly share code, notes, and snippets.

jondlm / Execute Sql Agent Job.ps1
Last active Dec 20, 2015
A small script to kick off a SQL agent job on SQL Server.
View Execute Sql Agent Job.ps1
Write-Host "Loading connection..." -ForegroundColor Yellow -NoNewline
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
Write-Host "Done." -ForegroundColor Green
#Set the connection string
$SqlConnection.ConnectionString = "Server=,<server name>;Database=<database name>;Integrated Security=True"
#Declare a SqlCommand object
$SqlCommand = New-Object System.Data.SqlClient.SqlCommand
jondlm / CompareTableColumns.sql
Created Mar 28, 2013
A TSQL helper stored proc for comparing the column names of two tables.
View CompareTableColumns.sql
-- =============================================
-- Author: Jon -
-- Create date: 2013-03-05
-- Description: Helper function for comparing columns between two tables.
-- =============================================
CREATE FUNCTION [helper].[fnCompareTableColumns] (
@baseTable varchar(250),
@compareTable varchar(250)
jondlm / UnknownRecord.sql
Last active Dec 14, 2015
A TSQL helper stored proc to generate and insert your unknown records for you. Be sure to modify and test the stored proc before implementing it. It can be tested by not supplying the third @action parameter, and it can be executed by specifying a third @action parameter of ‘runit’. Credit to…
View UnknownRecord.sql
-- author:
-- create: 2013-03-08
-- description: this proc will take table name, schema name, and optional action parameters
-- and insert an "unknown" record into that dimension table for you. If you don't
-- specific the @Action parameter as 'runit', then it will only print the SQL
-- output for you.
create proc [helper].[UnknownRow]
@TableName sysname,
@TableSchema sysname = 'dbo',
View webpack_bundle_analysis.go
// Make sure you have a `bundle.js` file in the current dir and run this like:
// # go run webpack_bundle_analysis.go | sort -n
package main
import (
jondlm / good-examples.js
Created Jul 4, 2015
Good logging examples
View good-examples.js
data: {
"event": "response",
"timestamp": 1436046421423,
"id": "1436046421423:jdelamotte:5282:ibpkyk17:10001",
"instance": "http://jdelamotte:8888",
"labels": [],
"method": "get",
"path": "/js/bundle.js",
"query": {},
"responseTime": 8,
View functions.js
// -------------------------------------
// Example 1 (function expression)
test(); // Won't work
var test = function () {
jondlm /
Last active Aug 29, 2015
Basics of web development
jondlm / index.js
Created Jan 28, 2015
requirebin sketch
View index.js
var h = require('virtual-dom/h');
var diff = require('virtual-dom/diff');
var patch = require('virtual-dom/patch');
var createElement = require('virtual-dom/create-element');
var rows = [
{data: 'hello'},
{data: 'there'},
{data: 'friend.'}
jondlm / index.js
Last active Aug 29, 2015
virtual-dom drag and drop
View index.js
var Rx = require('rx');
// Create draggable element, nothing fancy going on here
var box = document.createElement('div'); = = '100px'; = 'grey'; = 'absolute';
box.innerText = 'Drag me';
jondlm / index.js
Created Dec 3, 2014
rx error handling
View index.js
var Rx = require('rx');
var $ = require('jquery');
function searchWikipedia (term) {
return $.ajax({
url: '',
dataType: 'jsonp',
data: {
action: 'opensearch',
format: 'json',