Skip to content

Instantly share code, notes, and snippets.

@zaus
zaus / _vendorize.scss
Last active October 11, 2015 23:58 — forked from heroheman/gist:3907611
SASS: Vendorize Mixin with editable vendors
// edit for whichever you care about
$vendors: 'webkit', 'moz', 'ms'; // 'webkit', 'moz', 'ms', 'o', 'khtml';
/// @summary Repeat for multiple vendor prefixes, like prefix-free processor
/// @param $property the property to repeat
/// @param $noplain set 'true' to disable prefixless option
/// @param $vendors override the global vendor list
/// @param $prefix optional additional prefix; supposed to allow keyframe specification with `@`
///
/// @see http://css-tricks.com/redesigning-with-sass/ for references
@mixin vendorize($property, $value, $noplain: false, $vendors: $vendors, $prefix:'') {
@zaus
zaus / SublevelFilterTest_Order.cs
Created October 19, 2012 13:32 — forked from zaus/SublevelFilterTest.cs
C# Linq Sublevel Filtering - Only return 1st-level with matching 2nd-level items, but resultset only contains matching 2nd-level items; more "practical" example with Order/LineItem relationship
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace Playground.Tests {
public class OrderSubsetTests {
#region -------------- classes ----------------
@zaus
zaus / SublevelFilterTest.cs
Created October 18, 2012 15:09
C# Linq Sublevel Filtering - Only return 1st-level with matching 2nd-level items, but resultset only contains matching 2nd-level items
public class LinqSubsetTests {
/// example class
public class Foo {
public long ID { get; set; }
public int Filterable { get; set; }
public string Name { get; set; }
public IEnumerable<Bar> Children { get; set; }
@zaus
zaus / Haacked.StringLib.TestSetup.cs
Created September 21, 2012 18:57
Randomly create a formatting string mask for use in testing Haacked.StringLib operations, and associated tests
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AtifAzis.Extensions;
/// for http://haacked.com/archive/2009/01/14/named-formats-redux.aspx and https://gist.github.com/3763138
namespace Tests.Haacked.StringLib {
@zaus
zaus / Haacked.StringLib.ZausFormatter.cs
Created September 21, 2012 18:37
C# Named token replacement as an alternative to the numerical tokens of String.Format - yet another attempt at performance
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/// via original discussion http://haacked.com/archive/2009/01/14/named-formats-redux.aspx
namespace Haacked.StringLib {
/// <summary>
/// Extension string methods for named token replacement