Skip to content

Instantly share code, notes, and snippets.

View dancrowley303's full-sized avatar

Dan Crowley dancrowley303

View GitHub Profile
namespace Utilities
{
public class QueryStringBuilder : Dictionary<string, string>
{
public string Generate()
{
if (Count == 0) return string.Empty;
return "?" + string.Join("&", GenerateSegments());
}
routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.([iI][cC][oO]|[gG][iI][fF])(/.*)?" });
<html>
<head>
<link rel="stylesheet" type="text/css" href="css_floats_content_and_nav.css" />
</head>
<body>
<div id="container">
<div id="content">
float1<br>float1<br>float1<br>
float1<br>float1<br>float1<br>
#container
{
width: 900px;
padding: 0;
background: #000;
}
#content
{
background: #F00;
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#container
{
width: 900px;
overflow: hidden;
padding: 0;
background: #000;
<html>
<head>
<style type="text/css">
* { visibility: hidden }
h1 { visibility: visible }
</style>
</head>
<body>
<html>
<style type="text/css">
div { float: right }
* { float: none }
</style>
<body>
<div class="floatright">float right</div>
<p>I'm defined under the right floated right div</p>
@dancrowley303
dancrowley303 / activerecordlog2devnull.rb
Created February 22, 2011 06:25
Stop Active Record logging to stdout
#Add this line to development.rb to shut up ActiveRecord
ActiveRecord::Base.logger = Logger.new('/dev/null')
@dancrowley303
dancrowley303 / win_scancode.txt
Created May 9, 2011 06:56
Windows Scancode Map
System\\CurrentControlSet\\Control\\Keyboard Layout
@dancrowley303
dancrowley303 / gist:976114
Created May 17, 2011 07:44
wpf cucumber style syntax
This is an example of the type of domain syntax I'd want in a WPF UI automation testing feature:
Given the default user exists
When I enter "daniel" in the username textbox
And I enter "pass" in the password textbox
And I click the authenticate button
Then I should see the authentication panel
And the border of the username textbox should be red