Skip to content

Instantly share code, notes, and snippets.

View trullock's full-sized avatar

Andrew Bullock trullock

View GitHub Profile
@trullock
trullock / sample.cs
Last active December 15, 2015 23:22
namespace ConsoleApp1
{
public class Program
{
public static void Main(string[] args)
{
Task.Run(() => Foo()).Wait();
}
static async Task Foo()
@import "one.less";
@import "two.less";
var focusing = false;
this.$navTxtSearch.focus(function (e) {
if (focusing) {
focusing = false;
return true;
}
focusing = true;
$('html').scrollTop(0);
var defaultDiacriticsRemovalMap = [
{ 'base': 'A', 'letters': /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g },
{ 'base': 'AA', 'letters': /[\uA732]/g },
{ 'base': 'AE', 'letters': /[\u00C6\u01FC\u01E2]/g },
{ 'base': 'AO', 'letters': /[\uA734]/g },
{ 'base': 'AU', 'letters': /[\uA736]/g },
{ 'base': 'AV', 'letters': /[\uA738\uA73A]/g },
{ 'base': 'AY', 'letters': /[\uA73C]/g },
{ 'base': 'B', 'letters': /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g },
{ 'base': 'C', 'letters': /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g },
change this:
<img src="/storage/skream-roller-coaster.jpg?__SQUARESPACE_CACHEVERSION=1379152069533" alt="">
into this:
<img src="/storage/skream-roller-coaster.jpg?__SQUARESPACE_CACHEVERSION=1379152069533" alt="" onClick="_gaq.push(['_trackEvent', 'PostImage', 'Clicked']);">
this.cancellationTokenSource = new CancellationTokenSource();
var po = new ParallelOptions
{
MaxDegreeOfParallelism = 8,
CancellationToken = this.cancellationTokenSource.Token
};
try
{
var index = null;
var capture;
if(minY != minGroupY) {
for (index = 0; index < props.cols - 1; index++) {
if (props.colYs[index] == props.colYs[index + 1]) {
capture = index;
break;
}
}
}
static void Main(string[] args)
{
HostFactory.Run(x =>
{
x.Service<IService>(s =>
{
s.SetServiceName("bar");
s.ConstructUsing(name =>
{
try
set transaction isolation level read uncommitted
select
c.[Id],
c.[Name],
c.[SentOn],
count(s.Id) as sent,
sum(cast(s.[Bounced] as int)) as bounced,
sum(cast(s.[Complained] as int)) as complained,
sum(cast(s.[Opened] as int)) as opened,
set transaction isolation level read uncommitted
select
c.[Id],
c.[Name],
c.[SentOn],
count(distinct s.Id) as sent,
sum(case when s.[Bounced] = 1 then 1 else 0 end) as bounced,
sum(case when s.[Complained] = 1 then 1 else 0 end) as complained,
sum(case when s.[Opened] = 1 then 1 else 0 end) as opened,