Skip to content

Instantly share code, notes, and snippets.

@jahfer
jahfer / clearfix.css
Created June 24, 2012 15:32
CSS: Clearfix
.group:before,
.group:after {
content:"";
display:table;
}
.group:after {
clear:both;
}
.group {
zoom:1; /* For IE 6/7 (trigger hasLayout) */
@jahfer
jahfer / center.css
Created June 24, 2012 15:30
CSS: Center child w/ unknown size
/* Source: http://css-tricks.com/centering-in-the-unknown/ */
/* This parent can be any width and height */
.block {
text-align: center;
}
/* The ghost, nudged to maintain perfect centering */
.block:before {
content: '';
@jahfer
jahfer / index.html
Created June 3, 2012 23:29
HTML: Base
<!doctype html>
<!--[if lt IE 9]><html class="ie"><![endif]-->
<!--[if gte IE 9]><!--><html><!--<![endif]-->
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title></title>
@jahfer
jahfer / getset.js
Created May 14, 2012 03:21
JavaScript: Get/Set Properties
// Super amazing, cross browser property function, based on http://thewikies.com/
// Found via http://johndyer.name/native-browser-get-set-properties-in-javascript/
function addProperty(obj, name, onGet, onSet) {
// wrapper functions
var
oldValue = obj[name],
getFn = function () {
return onGet.apply(obj, [oldValue]);
@jahfer
jahfer / gist:2690835
Created May 13, 2012 23:52
CSS: Media Queries
/* Desktop */
/* Mobile in portrait */
@media only screen and (max-width: 47.9375em) {
}
/* Mobile in Landscape */
@media only screen and (min-width: 30em) and (max-width: 47.9375em) {
@jahfer
jahfer / gist:2690856
Created May 13, 2012 23:59
JavaScript: Hints
/*
===========================================
JavaScript Hints & Tips
Compiled mainly from http://sharedfil.es/js-48hIfQE4XK.html
===========================================
// onReady
document.addEventListener("DOMContentLoaded", function() {
// code...
});
@jahfer
jahfer / gist:2690846
Created May 13, 2012 23:56
CSS: Image Replacement
.ir { border: 0; font: 0/0 a; text-shadow: none; color: transparent; background-color: transparent; }

Election 42 Notes

Child-care

  • NDP :: National $15/day daycare + keep Universal Child Care Benefit from Conservatives
  • Conservatives :: Universal Child Care Benefit (taxable)
  • Liberals :: Canada Child Benefit (non-taxable)

Senate

  • NDP :: Abolish
  • Conservatives :: No new appointments, let provinces deal with it
  • Liberals :: Reform
@jahfer
jahfer / generator-to-map.js
Last active August 29, 2015 14:14
Messing with ES6 Map + Generator
const ENDKEY = Symbol('endOfMap');
function* simpleGen() {
let counter = 0
while (counter++ < 3) {
yield [counter, true]
}
yield [ENDKEY, false]
}
@jahfer
jahfer / init.el
Last active August 29, 2015 14:09
Emacs config
;; Package
;; Managing extensions for Emacs is simplified using =package= which
;; is built in to Emacs 24 and newer. To load downloaded packages we
;; need to initialize =package=.
(require 'package)
(setq package-enable-at-startup nil)
(package-initialize)