Instantly share code, notes, and snippets.

View test.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Threading.Tasks;
View qsort.cs
// https://github.com/mono/mono/blob/master/mono/eglib/gqsort.c
/*
* QuickSort
*
* Author: Jeffrey Stedfast <fejj@novell.com>
*
* (C) 2011 Novell, Inc.
*
View test.csproj
<?xml version="1.0" encoding="utf-8"?>
<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">net_4_x</Platform>
<ProjectGuid>{E3149CAB-0AC5-415C-9309-E2636CAF1EBD}</ProjectGuid>
<OutputType>Library</OutputType>
<NoWarn>1699,436</NoWarn>
<LangVersion>latest</LangVersion>
View gist:2cdf6714c7f44971692e4d4ad38a4077
// Parsed 23 sources file(s) and 13 exclusions file(s) from path '/home/kate/Projects/mono/mcs/class/corlib/xbuild_14_corlib.dll'.
File does not exist: /home/kate/Projects/mono/mcs/class/corlib/System.Security.Permissions/FileDialogPermission.cs
File does not exist: /home/kate/Projects/mono/mcs/class/corlib/System.Security.Permissions/IsolatedStorageFilePermission.cs
File does not exist: /home/kate/Projects/mono/mcs/class/corlib/System.Security.Permissions/PrincipalPermission.cs
File does not exist: /home/kate/Projects/mono/mcs/class/corlib/System.Security.Permissions/PublisherIdentityPermissionAttribute.cs
View gist:b93c022f2d48cae0665068a6f55b915c
private static TimeZoneInfo ParseTZBuffer (string id, byte [] buffer, int length)
{
//Reading the header. 4 bytes for magic, 16 are reserved
int ttisgmtcnt = ReadBigEndianInt32 (buffer, 20);
int ttisstdcnt = ReadBigEndianInt32 (buffer, 24);
int leapcnt = ReadBigEndianInt32 (buffer, 28);
int timecnt = ReadBigEndianInt32 (buffer, 32);
int typecnt = ReadBigEndianInt32 (buffer, 36);
int charcnt = ReadBigEndianInt32 (buffer, 40);
View videocrop.bat
@if [%4]==[] goto error
@goto ok
:error
@echo USAGE: videocrop START_TIME DURATION INPUT OUTPUT
@goto end
:ok
@set START_TIME=%1
@set DURATION=%2
View gist:2db54dd9272e1eb9e8b7066849d571b2
<?xml version="1.0" encoding="utf-8"?>
<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">net_4_x</Platform>
<ProjectGuid>{804E854F-E8F5-4E2B-807A-4FAF4BE99C03}</ProjectGuid>
<OutputType>Exe</OutputType>
<NoWarn>1699</NoWarn>
<LangVersion>latest</LangVersion>
View gist:e45d38ef861951bb330dc5790472aa98
Discovered: Roslyn.Compilers.CSharp.Semantic.UnitTests
Starting: Roslyn.Compilers.CSharp.Semantic.UnitTests
Stacktrace:
at <unknown> <0xffffffff>
at System.Lazy`1<T_REF>.CreateValue () [0x00060] in /home/kate/Projects/mono/mcs/class/referencesource/mscorlib/system/Lazy.cs:437
at System.Lazy`1<T_REF>.LazyInitValue () [0x00023] in /home/kate/Projects/mono/mcs/class/referencesource/mscorlib/system/Lazy.cs:359
at System.Lazy`1<T_REF>.get_Value () [0x0003a] in /home/kate/Projects/mono/mcs/class/referencesource/mscorlib/system/Lazy.cs:339
at Roslyn.Test.Utilities.TestBase.get_MscorlibRef () [0x00005] in <03978e641ba3448b84a20881f1ba4c5c>:0
at Microsoft.CodeAnalysis.CSharp.Test.Utilities.CSharpTestBaseBase..cctor () [0x00007] in <55b67459709c4ab09e2fd17f47af8dd3>:0
View gist:7f3250346c9b5023c27469ab03b72acb
var html = "";
for (var i = 0; i < urls.length; i++) {
html += "<link rel='preload' as='fetch' crossorigin='anonymous' href='" + urls[i] + "'>\n";
}
var e = context.document.createElement("div");
e.innerHTML = html;
e.id = "vm-preloads";
View gist:4c6e7bf7e9138b640f0bb98fc4e8a8d4
div.lis-ability.on {
-webkit-transform: none !important;
transform: none !important;
}
div.lis-ability.btn-ability-unavailable.on::after {
display: none !important;
}
div.lis-ability::after {