Skip to content

Instantly share code, notes, and snippets.

@asabaylus
asabaylus / gist:3071099
Created July 8, 2012 14:12
Github Markdown Heading Anchors

Anchors in Markdown

To create an anchor to a heading in github flavored markdown. Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:

[create an anchor](#anchors-in-markdown)

@darylteo
darylteo / NinjectWebCommon.cs
Created July 5, 2014 08:04
Ninject injection into Signalr Hubs with ninject.mvc5.
[assembly: WebActivatorEx.PreApplicationStartMethod(typeof(Ascend.Core.Application.App_Start.NinjectWebCommon), "Start")]
[assembly: WebActivatorEx.ApplicationShutdownMethodAttribute(typeof(Ascend.Core.Application.App_Start.NinjectWebCommon), "Stop")]
namespace Ascend.Core.Application.App_Start
{
using System;
using System.Linq;
using System.Web;
using Microsoft.Web.Infrastructure.DynamicModuleHelper;
@brabao
brabao / ngrok-aspnet
Created December 12, 2016 10:48
ngrok visual studio asp.net
ngrok http [port] --host-header="localhost:[port]"
@thomaslevesque
thomaslevesque / CSharpErrorsAndWarnings.md
Last active June 18, 2024 07:18
All C# errors and warnings. NOTE: this list is out of date. See https://github.com/thomaslevesque/GenerateCSharpErrors/blob/master/CSharpErrorsAndWarnings.md for a more recent version

All C# errors and warnings

Parsed from the Roslyn source code using Roslyn.

Code Severity Message
CS0006 Error Metadata file '{0}' could not be found
CS0009 Fatal Metadata file '{0}' could not be opened -- {1}
CS0012 Error The type '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'.
CS0016 Error Could not write to output file '{0}' -- '{1}'
using System;
using System.Threading.Channels;
using System.Threading.Tasks;
namespace ChannelsAreCool
{
//Disclaimer : I didn't actually run this code so it might not quite work.
//Feel free to complain or ask questions and i'll fix it.
public static class Example
{
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def deleteNode(self, root: TreeNode, key: int) -> TreeNode:
def deleter(node: TreeNode, key: int):
if not node: