Skip to content

Instantly share code, notes, and snippets.

View dcneiner's full-sized avatar

Doug Neiner dcneiner

View GitHub Profile
@dcneiner
dcneiner / gist:1137601
Created August 10, 2011 17:48
List of Inherited CSS
Consolidated lists of CSS properties that are inherited by default.
Taken from http://www.w3.org/TR/CSS21/propidx.html
--------------------------------------------------------------------
One item not in the list was "text-decoration" which affects child elements. A few new properties (text-shadow) also affect child elements
List
azimuth
border-collapse
@dcneiner
dcneiner / dabblet.css
Created June 8, 2012 15:03 — forked from jonathansampson/dabblet.css
CSS Dice: An Experiment by Jonathan Sampson - @jonathansampson
/* CSS Dice: An Experiment by Jonathan Sampson - @jonathansampson */
.die.one:after {
box-shadow: 0 .2em 0 #FFF
}
.die.two:after {
background: transparent;
box-shadow: -2.3em -2.3em 0 #345,
2.3em 2.3em 0 #345,
-2.3em -2.3em 0 #FFF,
2.3em 2.4em 0 #FFF
@dcneiner
dcneiner / time-based.html
Created September 14, 2013 18:07
A quick jQuery plugin I wrote for a friend. Just will show or hide certain elements based on the time.
<!-- show this div between 2:00 and 2:30 September 19 -->
<div class="time-based" data-start="September 19, 2013 14:00:00 CDT" data-end="September 19, 2013 14:30:00 CDT">Hello there!</div>
<script>
$( ".time-based" ).timeBased();
</script>
/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {
$.event.special.textchange = {

Just a tiny gist to illustrate node shares required dependencies between different files that require the same module. Modifying underscore in the parent file modified it for the child files as well.

@dcneiner
dcneiner / Terminal.md
Last active December 18, 2015 23:39
Information about my terminal configuration and theme.

Terminal

Application

I use iTerm 2

Font

15pt Menlo Regular for Powerline (Menlo-Powerline.otf from this Gist)

@dcneiner
dcneiner / tools.md
Created February 23, 2013 11:46
A list of tools I use on a regular basis.

var shouldSerialize = (function () {
var serialize = false;
window.addEventListener( "message", function callback ( e ) {
serialize = e.data.sample === true;
window.removeEventListener( "message", callback );
}, false);
window.postMessage( { sample: true }, "*" );
return serialize;
}());
@dcneiner
dcneiner / machina.css-state.js
Created December 20, 2012 17:58
An example state machine that also maintains css state.
var Lightswitch = machina.Fsm.extend({
initialState: "off",
states: {
off: {
},
on: {