View ReadAtLeastAsync.cs
using System.Threading;
using System.Threading.Tasks;
using Channels;
namespace Microsoft.Extensions.WebSockets.Internal
{
public static class ChannelExtensions
{
public static ValueTask<ReadableBuffer> ReadAtLeastAsync(this IReadableChannel input, int minimumRequiredBytes) => ReadAtLeastAsync(input, minimumRequiredBytes, CancellationToken.None);
View .gitignore
node_modules/
View WebsocketDecoder.ts
document.writeln('<input style="width: 600px" id="hexcode" type="text" placeholder="hex values" />');
document.writeln('<button onclick="decode()">Decode</button>');
document.writeln('<div id="result" />');
var opcodes = [
'Continuation',
'Text',
'Binary',
'RESERVED',
'RESERVED',
View 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
View nuget3-and-msbuild.md

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
View GetActiveDNX.ps1
# 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)
View 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; }
View atom-shell.d.ts
/// <references src="node.d.ts" />
declare module "app" {
var app: AtomShell.App;
export = app;
}
declare module "browser-window" {
class _BrowserWindow extends AtomShell.BrowserWindow { }
View keybase.md

Keybase proof

I hereby claim:

  • I am anurse 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:

View HashCodeCombiner.cs
// 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
{