Skip to content

Instantly share code, notes, and snippets.

View analogrelay's full-sized avatar
💖

Ashley Stanton-Nurse analogrelay

💖
View GitHub Profile
@analogrelay
analogrelay / vimrc
Created June 9, 2015 22:33
My Vimrc
" Update MYVIMRC
let $MYVIMRC="~/.dotfiles/vim.symlink/vimrc"
let $MYCOLORS="~/.dotfiles/vim.symlink/colorscheme.vim"
set ff=unix
" Make windows accept unixy stuff
if has('win32') || has('win64')
set runtimepath=~/.vim,$VIM/vimfiles,$VIM,$VIM/vimfiles/after,~/.vim/after
set dir=$TEMP

MSBuild Targets and Props in NuGet 3

NuGet 2.x supports the inclusion of .targets and .props files in NuGet packages. These files will be added as Imports in the csproj MSBuild file when the package is installed. For example, consider a package with the following files:

/
    build/
        net40/
            MyPackage.props
 MyPackage.targets
@analogrelay
analogrelay / GetActiveDNX.ps1
Last active August 29, 2015 14:18
Get the active DNX and put it on your prompt
# If 'dnvm' is present, this code writes " ([activednx])" to the host, where [activednx] is the
# active DNX name. If 'dnvm' is not present, this writes nothing.
# If we have dnvm, use it to determine the active DNX
if(Get-Command dnvm -ErrorAction SilentlyContinue) {
$activeDnx = dnvm list -passthru | where { $_.Active }
if($activeDnx) {
Write-Host " (" -nonewline -ForegroundColor ([ConsoleColor]::Yellow)
Write-Host "dnx-$($activeDnx.Runtime)-win-$($activeDnx.Architecture).$($activeDnx.Version)" -nonewline -ForegroundColor ([ConsoleColor]::Cyan)
Write-Host ")" -nonewline -ForegroundColor ([ConsoleColor]::Yellow)
@analogrelay
analogrelay / drill
Last active February 2, 2018 22:43
My VIM drill
VIM Drill
=========
NEVER USE Arrows or Esc!
1. Type the following:
public class Foo {
public string Property { get; set; }
public int Property { get; set; }
@analogrelay
analogrelay / atom-shell.d.ts
Created December 22, 2014 04:22
Atom TypeScript definitions.
/// <references src="node.d.ts" />
declare module "app" {
var app: AtomShell.App;
export = app;
}
declare module "browser-window" {
class _BrowserWindow extends AtomShell.BrowserWindow { }
@analogrelay
analogrelay / keybase.md
Last active January 8, 2024 16:27
keybase.md

Keybase proof

I hereby claim:

  • I am analogrelay on github.
  • I am anurse (https://keybase.io/anurse) on keybase.
  • I have a public key whose fingerprint is 54D5 8341 7CFE 423E 5A54 D52B 4388 456B 1C13 750E

To claim this, I am signing this object:

@analogrelay
analogrelay / HashCodeCombiner.cs
Created February 19, 2014 02:56
HashCodeCombiner - Useful for GetHashCode implementations!
// Copied from http://aspnetwebstack.codeplex.com/SourceControl/latest#src/Common/HashCodeCombiner.cs
// Licensed under the Apache 2 License Terms as defined in http://aspnetwebstack.codeplex.com/SourceControl/latest#License.txt
// The only change made is to move the class to the System namespace to make it easily available in any project this file is included in.
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
using System.Collections;
namespace System
{
@analogrelay
analogrelay / JobsService.cs
Created December 18, 2013 17:46
A tiny snippet of what I'm trying to do. Full code is here: https://github.com/NuGet/NuGetGallery/tree/anurse/v3-jobs/src/Services and kinda complicated ;P
public class JobsService : NuGetService {
// .. stuff!
protected override Task<bool> OnStart() {
// Here, Container is the "scope" passed in to service.Initialize above.
Jobs = Container.Resolve<IEnumerable<JobDefinition>>();
// *** KA BOOM! Exception trying to construct a JobDefinition (when it's not designed to be constructed by Autofac) ***
}
public override void RegisterComponents(ContainerBuilder builder)
Id Version
-- -------
DotNetOpenAuth.AspNet 4.1.4.12333
DotNetOpenAuth.Core 4.1.4.12333
DotNetOpenAuth.OAuth.Consumer 4.1.4.12333
DotNetOpenAuth.OAuth.Core 4.1.4.12333
DotNetOpenAuth.OpenId.Core 4.1.4.12333
DotNetOpenAuth.OpenId.RelyingParty 4.1.4.12333
EntityFramework
@analogrelay
analogrelay / gist:5827060
Created June 20, 2013 21:56
Does this compile?
using System;
public static class Program
{
static void Main(string[] args)
{
http://localhost/index.html
Console.WriteLine("hello!");
}