Skip to content

Instantly share code, notes, and snippets.

Ed Charbeneau EdCharbeneau

Block or report user

Report or block EdCharbeneau

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@EdCharbeneau
EdCharbeneau / _raw-grid.scss
Created Jan 30, 2014
A super simple, and minimal grid system.
View _raw-grid.scss
/*
A simple grid system
*/
$layout-width: 980px;
$gutter:24px;
$small-device-width: 767px;
$vertical-whitespace: 20px;
// Predefined column widths
View test.html
<div class="grid col-220"><img src="http://placehold.it/150x210"/></div>
<div class="grid col-220"><img src="http://placehold.it/150x210"/></div>
<div class="grid col-220"><img src="http://placehold.it/150x210"/></div>
<div class="grid col-220 fit"><img src="http://placehold.it/150x210"/></div>
View jsWarrior.js
jsWarrior.turn = function(warrior) {
updateStatus(warrior);
executeFirstAvailableCommand(
warrior,
[
findDirection,
attack,
retreat,
@EdCharbeneau
EdCharbeneau / web.config.xml
Created Apr 9, 2014
.NET mail using a pickup directory
View web.config.xml
<!-- Add this to your web.config -->
<system.net>
<mailSettings>
<smtp deliveryMethod="SpecifiedPickupDirectory">
<specifiedPickupDirectory pickupDirectoryLocation="c:\temp\maildrop_debug\"/>
</smtp>
</mailSettings>
</system.net>
View YammerClient.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net;
using DotNetOpenAuth.AspNet.Clients;
using DotNetOpenAuth.Messaging;
using Newtonsoft.Json;
using YammerAuthentication.Yammer.Models.User;
View vertical-align-mixin.scss
// Source Article: http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/
@mixin vertical-align {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
View Buttons.helpers.cshtml
// These are not real helpers, only examples to show some helper code.
@Html.Button("text") //Default
// Renders
<button type="button" class="btn btn-default">Default</button>
@Html.Button("text").Primary()
// Renders
<button type="button" class="btn btn-primary">Primary</button>
// Etc...
@EdCharbeneau
EdCharbeneau / properties-for-helper.js
Last active Aug 29, 2015
Get and display css properties at runtime.
View properties-for-helper.js
(function () {
displayCssInfoFor();
})();
// A simple helper to display the CSS properties of an element at runtime.
// Use:
// By defualt, displays the color of the previous sibiling.
// <span data-properties-for></span>
// Specify element
// <span data-properties-for='{"element": "selector"}'></span>
@EdCharbeneau
EdCharbeneau / ie-10-lumia-viewport.html
Last active Aug 29, 2015
IE10 Mobile viewport fix
View ie-10-lumia-viewport.html
<!-- Windows Phone 8 and Internet Explorer 10
Internet Explorer 10 doesn't differentiate device width from viewport width,
and thus doesn't properly apply the media queries in Bootstrap's CSS.
To address this, you can optionally include the following CSS and JavaScript
to work around this problem until Microsoft issues a fix.
Attribution: overflow http://stackoverflow.com/questions/19659053/viewport-for-ie10-11-desktop-but-not-mobile
-->
<style>
@-webkit-viewport { width: device-width; }
@EdCharbeneau
EdCharbeneau / Schedule.cshtml
Created Dec 14, 2014
Umbraco with Telerik Scheduler
View Schedule.cshtml
@using Kendo.Mvc.UI;
@using EventSchedule;
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = "_Layout.cshtml";
var scheduleDate = Model.Content.GetPropertyValue<DateTime>("displayDate");
var events = Model.Content.Children.Select(child => new MyEvent(child));
}
You can’t perform that action at this time.