Skip to content

Instantly share code, notes, and snippets.

View justinspradlin's full-sized avatar

Justin Spradlin justinspradlin

View GitHub Profile
<div ng-controller="u7dtg.prevaluesController">
<table class="table table-striped table-responsive table-hover prevalusTable">
<thead>
<tr>
<th>#</th>
<th>Title</th>
<th>Alias</th>
<th>Type</th>
<th></th>
</tr>
@justinspradlin
justinspradlin / DescendantPickerBase
Created November 14, 2013 19:07
Example Umbraco Macro Parameter editor. This editor allows you to pick a descendant node based on a specific document type alias. This particular parameter editor supported picking a descendant node to feed a macro to render a playlist. The document type Question has a rich text editor property bodyText. The content editors can create children "…
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
using umbraco.interfaces;
using Umbraco.Core;
using Umbraco.Web;
namespace Customer.MacroParameters
{
@justinspradlin
justinspradlin / updateuserinfo.js
Last active December 21, 2015 16:18
Azure Mobile Service Update User Info Custom Api
exports.post = function(request, response) {
var identities = request.user.getIdentities();
var basicProfileUrl;
if (identities.microsoft) {
var liveAccessToken = identities.microsoft.accessToken;
basicProfileUrl = 'https://apis.live.net/v5.0/me/?method=GET&access_token=' + liveAccessToken;
}
@justinspradlin
justinspradlin / dropbox-chrome-setup.bat
Last active December 11, 2015 01:38
This script will setup DropBox syncing of your Chrome custom stylesheets. This is really useful if you have a custom dev tools stylesheet. More information for custom Dev Tool stylesheets can be found here: http://darcyclarke.me/design/skin-your-chrome-inspector/.
@echo off
:: This script will setup dropbox to sync Chrome's User Stylesheets.
:: It is a shim since Chromium probably won't add this file to Chrome-Sync in the future.
:: See http://code.google.com/p/chromium/issues/detail?id=136479 for more details.
::
:: The main purpose of this script is to sync the style sheet used for Dev Tools.
:: See http://darcyclarke.me/design/skin-your-chrome-inspector/ for more information
:: on stylying your Chrome Dev Tools.
::
@justinspradlin
justinspradlin / get-csv-from-table-value-parameter.sql
Created October 18, 2012 15:04
SQL - Get CSV string from table value parameter
/* --------------------------------------------------------------------------------------------------
Create the type for the table valued parameter
----------------------------------------------------------------------------------------------------*/
IF EXISTS (SELECT * FROM sys.types st JOIN sys.schemas ss ON st.schema_id = ss.schema_id WHERE st.name = N'StringTable' AND ss.name = N'dbo')
DROP TYPE [dbo].[StringTable]
GO
CREATE TYPE [dbo].[StringTable] AS TABLE(
[TextValue] [varchar](max) NULL
)
@justinspradlin
justinspradlin / sublime-text-2-setup-dropbox.bat
Created July 13, 2012 14:04
Create Symlinks for Sublime Text 2 Syncing
@echo off
REM This script should delete any settings for your local
REM installation of Sublime Text 2. It will then create
REM sym-links that point to your Dropbox folder
SET dropboxSettingDir=%USERPROFILE%\Dropbox\Apps\Sublime Text 2\
SET sublimePluginDir=%APPDATA%\Sublime Text 2\
echo Local Settings Dir: %sublimePluginDir%
<people>
<person name="John Doe"/>
</person>