Skip to content

Instantly share code, notes, and snippets.

View rosemarydotworld's full-sized avatar
🐌
buffering

Rosemary Campbell rosemarydotworld

🐌
buffering
View GitHub Profile
@rosemarydotworld
rosemarydotworld / gist:8653462
Created January 27, 2014 17:39
Clean Code Contest Rules

Clean Code Contest

Here's the rules:

  1. Submit code by gist to the Hipchat room.
  2. If the code is a rewrite of previous code, include previous code as well as rewrite.
  3. Any amount of code can be submitted. A really well written function can win.
  4. Only submit code you wrote on the day of the contest. Honor system, people.
  5. I accept Tritium, Sass, and Javascript.
  6. Contest is closed at 4:30 PM, the winner will be announced shortly thereafter.
@rosemarydotworld
rosemarydotworld / gist:5352054
Created April 10, 2013 05:30
Output of `npm list`
├─┬ hoodie-app@0.4.13
│ ├─┬ connect@2.7.4
│ │ ├── buffer-crc32@0.1.1
│ │ ├── bytes@0.2.0
│ │ ├── cookie@0.0.5
│ │ ├── cookie-signature@0.0.1
│ │ ├── debug@0.7.2
│ │ ├── formidable@1.0.11
│ │ ├── fresh@0.1.0
│ │ ├── pause@0.0.1
<?php
//give blocks semantic html ids and theme hook suggestions
function wmux_preprocess_block(&$vars) {
$semantic_block_id = wmux_id_safe($vars['block']->subject);
$vars['semantic_block_id'] = $semantic_block_id;
$vars['theme_hook_suggestions'][] = 'block__' . $semantic_block_id;
}
function wmux_id_safe($string) {