Skip to content

Instantly share code, notes, and snippets.

View chilversc's full-sized avatar

Chris Chilvers chilversc

View GitHub Profile
Public Class Class1
Private Delegate Sub AnEventHandler(Of T)(ByVal newValue As T)
Private Event A As AnEventHandler(Of Integer) 'Works
Private Event B As AnEventHandler(Of Guid) 'Works
Private Event C As AnEventHandler(Of Foo) 'Works
Private Event D As AnEventHandler(Of Bar(Of Integer)) 'Works
Private Event E As AnEventHandler(Of Bar(Of Guid)) 'Works
Private Event F As AnEventHandler(Of Bar(Of Foo)) 'Works
.class interface private abstract auto ansi IBob
{
.method public newslot abstract strict virtual
instance void Foo() cil managed
{
} // end of method IBob::Foo
.method public newslot abstract strict virtual
instance void Bar() cil managed
{
@chilversc
chilversc / Output.xml
Created November 11, 2011 17:14
FNH - overiden methods
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class xmlns="urn:nhibernate-mapping-2.2" name="ConsoleApplication1.ItemBase, ConsoleApplication1" table="`ItemBase`">
<id name="Id">
<generator class="identity" />
</id>
<property name="Name" />
<joined-subclass name="ConsoleApplication1.Item, ConsoleApplication1">
<key>
<column name="ItemBase_id" />
</key>
@chilversc
chilversc / gist:1442357
Created December 7, 2011 10:45
Problem merging changes to file that was renamed
#!/bin/sh
# Create empty repository for testing
mkdir cherrypick
cd cherrypick
git init
# Simulate some initial work
echo bob > a.txt
git add a.txt
@chilversc
chilversc / Options.cs
Created December 7, 2011 15:15
Mono.Options (because I keep losing the damned thing)
//
// Options.cs
//
// Authors:
// Jonathan Pryor <jpryor@novell.com>
// Federico Di Gregorio <fog@initd.org>
//
// Copyright (C) 2008 Novell (http://www.novell.com)
// Copyright (C) 2009 Federico Di Gregorio.
//
@chilversc
chilversc / fullcalendar.css
Created December 12, 2011 15:04
qtip positioning error
/*
* FullCalendar v1.5.1 Stylesheet
*
* Copyright (c) 2011 Adam Shaw
* Dual licensed under the MIT and GPL licenses, located in
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
*
* Date: Sat Apr 9 14:09:51 2011 -0700
*
*/
@chilversc
chilversc / sql query
Created December 14, 2011 23:33 — forked from anonymous/sql query
SELECT
os.orders_status_id,
os.date_added,
os.customer_notified,
os.comments,
o.customers_id,
o.customers_email_address,
o.orders_status,
o.date_purchased,
c.customers_id,
D:.
\---Pyrus-2.0.0a4
+---.xmlregistry
| \---packages
| \---pyrus.net
| \---Pyrus
+---data
| +---pear2.php.net
| | \---PEAR2_Console_CommandLine
| \---pyrus.net
@chilversc
chilversc / gist:2050794
Created March 16, 2012 16:15
Powershell, copy multiple registry values
(gi SOURCE).Property | ?{$_ -like "Colour*"} | %{cpp SOURCE TARGET -Name $_}
@chilversc
chilversc / gist:2253032
Created March 30, 2012 17:12
IE 8 JSON madness
<html>
<head>
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=8">
</head>
<body>
<h1>Test</h1>
<pre id="testout"></pre>