This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Directions | |
// Step 1: Click Gist Raw, then Copy/Paste entire gist into Bookmarklets.org/maker/ | |
// Step 2: Change the first 3 variables: alias, event, docs | |
// Step 3: At the bottom of the Bookmarklets.org page, drag the Bookmarklet Hyperlink to your Browser ToolBar | |
// Step 4: Enjoy | |
var alias = 'scottca'; | |
var event = 'docs'; //docs,build,ignite,blog,think of this as broad category | |
var channel = 'twitter'; //facebook,hackernews,print,think of this as medium being used |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ | |
var a = "scottca"; | |
var l = window.location; | |
var s = l.search; | |
var utms = (s?s+"&":"?")+"utm_source="+a+"&utm_medium=twitter"+l.hash; | |
l.assign(utms); | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<root> | |
<!-- | |
Microsoft ResX Schema | |
Version 2.0 | |
The primary goals of this format is to allow a simple XML format | |
that is mostly human readable. The generation and parsing of the | |
various data types are done through the TypeConverter classes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class HtmlHelpers | |
{ | |
/// Code started from SO: | |
/// http://stackoverflow.com/questions/6578495/how-do-i-display-the-displayattribute-description-attribute-value | |
/// <summary> | |
/// Usage: | |
/// @Html.DisplayFor(m => m.PropertyName) | |
/// | |
/// supply cssclass name, and override span with div tag | |
/// @Html.DisplayFor(m => m.PropertyName, "desc", "div") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using NodaTime; | |
using NodaTime.TimeZones; | |
namespace Whatever | |
{ | |
public static class DateTimeExtensions | |
{ | |
public static DateTime AdjustTo(this DateTime date, string timeZoneId) |