Skip to content

Instantly share code, notes, and snippets.

View motowilliams's full-sized avatar

Eric Williams motowilliams

View GitHub Profile
@motowilliams
motowilliams / trello-css-guide.md
Last active August 29, 2015 14:27 — forked from bobbygrace/trello-css-guide.md
Trello CSS Guide

Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

This is where any fun you might have been having ends. Now it’s time to get serious and talk about rules.

Writing CSS is hard. Even if you know all the intricacies of position and float and overflow and z-index, it’s easy to end up with spaghetti code where you need inline styles, !important rules, unused cruft, and general confusion. This guide provides some architecture for writing CSS so it stays clean and ma

@motowilliams
motowilliams / gist:2026429
Created March 13, 2012 03:25 — forked from darrelmiller/gist:2026145
ThroughputMessageHandler
public class ThroughputMessageHandler : DelegatingHandler
{
private readonly ILogger _logger;
private Timer _timer;
private int _count;
public ThroughputMessageHandler(ILogger logger)
{
_logger = logger;
_count = 0;
_timer = new Timer(new TimerCallback(timerCallback),null,1000,1000);
@motowilliams
motowilliams / NuGet.targets.xml
Created March 12, 2012 23:52 — forked from bradwilson/InlineTask.targets.xml
Inline MSBuild task to download NuGet.exe - NuGet.targets
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
<NuGetExePath>$(NuGetToolsPath)\nuget.exe</NuGetExePath>
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
<PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
@motowilliams
motowilliams / gist:1881448
Created February 22, 2012 04:36 — forked from half-ogre/NuGet.targets.xml
An MSBuild target to add to your project files that will restore packages *if* nuget.exe is available via the PATH environment variable.
<!-- add this target to *each* project file, and modify the BeforeBuild target that's already in the project file (usually commented out) to depend on it -->
<Target Name="RestoreNuGetPackages" Condition="Exists('.\packages.config')">
<!-- try to execute `nuget help` to see if it's available from what's in the PATH -->
<Exec Command="cmd.exe /c nuget help &gt; NUL" IgnoreExitCode="True">
<Output TaskParameter="ExitCode" PropertyName="NuGetExitCode"/>
</Exec>
<!-- raise an error if nuget.exe wassn't available from what's in the PATH -->
<Error Text="Failed to execute nuget.exe; please make sure your PATH environment variable provides a path to nuget.exe." Condition="'$(NuGetExitCode)' != '' and '$(NuGetExitCode)' > '0'" />
<!-- restore packages -->
<Exec Command="nuget install .\packages.config -o $(SolutionDir)\packages" />
@motowilliams
motowilliams / GoogleMapsApiTests.cs
Created January 16, 2012 20:45 — forked from mythz/GoogleMapsApiTests.cs
Parsing the GMaps API JSON Response with ServiceStack's JsonSerializer
//Code sample from test:
//https://github.com/ServiceStack/ServiceStack.Text/blob/master/tests/ServiceStack.Text.Tests/DynamicModels/GoogleMapsApiTests.cs
using System;
using System.Collections.Generic;
using NUnit.Framework;
namespace ServiceStack.Text.Tests.DynamicModels
{
public class GoogleMapsApiTests
@motowilliams
motowilliams / _config.yml
Created October 22, 2011 07:16 — forked from edavis10/_config.yml
Pagination in Jekyll
# ....other stuff here
paginate: 10