Skip to content

Instantly share code, notes, and snippets.

Working from home

Brandon Satrom bsatrom

Working from home
View GitHub Profile
bsatrom / usage.js
Created Jun 2, 2011
Starting point for mocking window.external methods for Pinned Site functionality
View usage.js
//sample usage, with qUnit and pinify
//<script src="js/jquery-1.6.min.js"></script>
//<script src="js/jquery.pinify.js"></script>
//<script src="js/qunit.js"></script>
module('', {
teardown: function() {
View pinning-meta.html
<link rel="shortcut icon" type="image/ico" href="http://localhost/favicon.ico">
<meta name="application-name" content="mySite">
<meta name="msapplication-tooltip" content="mySite">
<meta name="msapplication-starturl" content="http://mysite/Home">
<meta name="msapplication-navbutton-color" content="Green">
<meta name="msapplication-window" content="width=800;height=600">
<meta name="msapplication-task"
View pinify-basic.js
applicationName: 'User InExperience',
tooltip: 'Brandon Satrom on Development, Design and Architecture',
tasks: [ {
'name': 'Blog',
'action': '',
'icon': 'favicon.ico'
'name': 'Twitter',
View pinify-scripts.html
<script type="text/javascript" src="/scripts/jquery-1.5.min.js"></script>
<script type="text/javascript" src="/scripts/jquery.pinify.js"></script>
View pinTeaser.js
$('#teaser').pinify('pinTeaser', {
addStartLink: false,
backgroundColor: '#ea6d03',
pinText: 'Drag this image to the taskbar to pin this site!'
View addJumpList.js
$.getJSON('Gallery/List', function (data) {
var itemList = [];
$.each(data, function (key, val) {
var item = {
'name': data[key].name,
'url': 'Gallery/View/' + data[key].id,
'icon': '/Content/Images/icon-gallery.ico'
View addOverlay.js
setInterval(function () {
$.getJSON('Photo/CommentsForUser/' + new Date().getTime() , function (data) {
var itemList = [];
var commentCount = parseInt($('#commentCount').val());
if (data.length > commentCount) {
View idependencyresolver.cs
public interface IDependencyResolver
object GetService(Type serviceType);
IEnumerable<object> GetServices(Type serviceType);
View structuremapcontainer.cs
public class StructureMapContainer : IDependencyResolver
static IContainer _container;
public StructureMapContainer(IContainer container)
_container = container;
_container.Configure(x => x.Scan(y =>
View setCurrent.cs
MvcServiceLocator.SetCurrent(new StructureMapContainer(container));