Skip to content

Instantly share code, notes, and snippets.

View jamesmanning's full-sized avatar

James Manning jamesmanning

View GitHub Profile
@jamesmanning
jamesmanning / Program.cs
Created January 16, 2013 18:48
example of how *not* to do namespace-based factory binding with ninject
using System;
using System.Linq;
using Ninject;
using Ninject.Extensions.Factory;
namespace SomeRootNamespace
{
class Program
{
static void Main(string[] args)
using System;
using System.Linq;
using Ninject;
using Ninject.Extensions.Factory;
namespace SomeRootNamespace
{
class Program
{
static void Main(string[] args)
DownloadManager Information: 0 : Loading product xml from: https://go.microsoft.com/?linkid=9819333
DownloadManager Information: 0 : https://go.microsoft.com/?linkid=9819333 responded with 302
DownloadManager Information: 0 : Response headers:
HTTP/1.1 302 Found
Cache-Control: private
Content-Length: 174
Content-Type: text/html; charset=utf-8
Expires: Tue, 05 Feb 2013 19:07:06 GMT
Location: http://www.microsoft.com/web/webpi/4.2/webproductlist.xml
Server: Microsoft-IIS/7.5
WebPiCmd Information: 0 :
DateTime=2013-02-12T19:08:58.1431473Z
WebPiCmd Warning: 0 : The software that you obtain using the Web Plaform Installer Command Line Tool is licensed to you by its owner. Microsoft grants you no rights for third party software.
DateTime=2013-02-12T19:08:58.1451474Z
WebPiCmd Verbose: 0 : Executing command: "C:\Program Files\Microsoft\Web Platform Installer\WebpiCmd.exe" /Install /AcceptEula "/Products:Workflow Manager Tools 1.0 for Visual Studio 2012" /log:c:\temp\wf-log.txt
DateTime=2013-02-12T19:08:58.1551480Z
WebPiCmd Information: 0 : Successfully loaded primary feed: https://go.microsoft.com/?linkid=9819333
DateTime=2013-02-12T19:08:59.2692117Z
WebPiCmd Start: 0 : The following software is going to be installed:
DateTime=2013-02-12T19:08:59.6282323Z
@jamesmanning
jamesmanning / Program.cs
Created April 19, 2013 19:03
using exception.ToString - sync code
using System;
using System.IO;
using System.Threading;
namespace ConsoleApplication10
{
class Program
{
static void Main(string[] args)
{
This file has been truncated, but you can view the full file.
var berryEmotes=[{"background-image":"http://a.thumbs.redditmedia.com/-UJ20dLxrm_8r4kr.png","tags":["lyra"],"sr":"marmemotes","height":140,"width":126,"names":["welliwashungryandwhenyoucravehands"],"apng_url":"http://backstage.berrytube.tv/marminator/images/a/-UJ20dLxrm_8r4kr.png"},{"background-image":"http://a.thumbs.redditmedia.com/1ERLWojxsUO7nFQT.png","tags":["luna",""],"sr":"marmemotes","height":140,"width":121,"names":["doodoodooluna"],"apng_url":"http://backstage.berrytube.tv/marminator/images/a/1ERLWojxsUO7nFQT.png"},{"background-image":"http://a.thumbs.redditmedia.com/84ozl2WMmiYp6Euf.png","tags":["oc",""],"sr":"marmemotes","height":140,"width":200,"names":["ivyrage","ierage"],"apng_url":"http://backstage.berrytube.tv/marminator/images/a/84ozl2WMmiYp6Euf.png"},{"background-image":"http://a.thumbs.redditmedia.com/E1FnMA0PMGL9qnwx.png","tags":["oc","berrytube"],"sr":"marmemotes","height":140,"width":118,"names":["keystrokeguitar"],"apng_url":"http://backstage.berrytube.tv/marminator/images/a/E1FnMA0PMG
This file has been truncated, but you can view the full file.
[{"em-text-transform":"uppercase","tags":["berrypunch","","new"],"em-height":"73px","em-overflow":"hidden","height":200,"em-width":"130px","names":["bpsign"],"em-position":"absolute","background-image":"http://a.thumbs.redditmedia.com/GJefDqUOKmm5aXNH.png","em-font-style":"normal","em-color":"#c25098","em-top":"8px","sr":"marmemotes2","em-font-size":"12px","em-font-weight":"bold","em-font-family":"\"arial\"","width":151,"em-left":"15px","background-position":["0px","-980px"],"em-text-align":"center"},{"background-image":"http://a.thumbs.redditmedia.com/-UJ20dLxrm_8r4kr.png","tags":["lyra"],"sr":"marmemotes","height":140,"width":126,"names":["welliwashungryandwhenyoucravehands"],"apng_url":"http://berrymotes.com/images/a/-UJ20dLxrm_8r4kr.png"},{"background-image":"http://a.thumbs.redditmedia.com/1ERLWojxsUO7nFQT.png","tags":["luna",""],"sr":"marmemotes","height":140,"width":121,"names":["doodoodooluna"],"apng_url":"http://berrymotes.com/images/a/1ERLWojxsUO7nFQT.png"},{"background-image":"http://a.thumbs.reddi
@jamesmanning
jamesmanning / contrived.cs
Created July 17, 2014 20:14
why empty list is better than null
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
@jamesmanning
jamesmanning / Gruntfile.js
Created August 22, 2014 23:59
Gruntfile.js from default 'yo angular' generation
// Generated on 2014-08-22 using generator-angular 0.9.5
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
@jamesmanning
jamesmanning / simpleclass.js
Created August 30, 2014 00:12
simple class example
class Foo {
constructor(someCtorParam) {
this.someClassVar = someCtorParam;
}
someMethod() {
console.log('in some method: ' + this.someClassVar);
}
}