Skip to content

Instantly share code, notes, and snippets.

@maxw3st
maxw3st / assessment.md
Created May 11, 2012 13:41 — forked from rmurphey/assessment.md
assessment

What do you think the following code does?

function fn(msg, time) {
  setTimeout(function() {
    console.log(msg);
  }, time);
}

fn('it works', 1000);
@maxw3st
maxw3st / dabblet.css
Created May 11, 2012 14:25 — forked from LeaVerou/dabblet.css
Masking an image with a gradient (answer to question)
/**
* Masking an image with a gradient (answer to question)
*/
div {
width: 200px; height: 200px;
background: linear-gradient(white, hsla(0,0%,100%,0)),
url(http://placekitten.com/200/200);
}
YUI.add('node-scroll-info', function (Y) {
/**
Provides the ScrollInfo Node plugin, which exposes convenient events and methods
related to scrolling.
@module node-scroll-info
**/
/**
@maxw3st
maxw3st / dantimer.rb
Created June 22, 2012 14:25 — forked from davetron5000/dantimer.rb
DanTimer
#!/usr/bin/ruby
require 'time'
def format_time(seconds)
hours = (seconds / 3600).to_i
minutes = ((seconds % 3600) / 60).to_i
seconds = (seconds % 60).to_i
minutes = "0#{minutes}" if minutes < 10
seconds = "0#{seconds}" if seconds < 10
@maxw3st
maxw3st / requirements.md
Created June 22, 2012 15:37 — forked from davetron5000/requirements.md
My Ideal Presentation Software

davetron5000's ideal presentation software

  • Editable as text, preferably markdown
  • Plays in a browser
  • Deployable to heroku or other service completely statically
  • clean default look that is easy to customize without slogging through generated HTML
  • hard-fix the dimensions, e.g. 1024x768 for projectors
  • support for remote control for advancing

Slide Types

@maxw3st
maxw3st / dabblet.css
Created June 25, 2012 05:03 — forked from LeaVerou/dabblet.css
CSS Box model demo
/**
* CSS Box model demo
*/
body {
width: 300px;
height: 200px;
padding: 30px;
border-width: 10px;
/*box-sizing: border-box;*/
@maxw3st
maxw3st / dabblet.css
Created June 25, 2012 14:20 — forked from daneden/dabblet.css
Multi-level dropdown menus
/**
* Multi-level dropdown menus
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
@maxw3st
maxw3st / dabblet.css
Created June 27, 2012 16:34 — forked from LeaVerou/dabblet.css
Challenge by HTeuMeuLeu
/**
* Challenge by HTeuMeuLeu
*/
body {
padding:50px;
background:#2fa7ca;
}
@maxw3st
maxw3st / one-mixin.scss
Created September 13, 2012 18:48 — forked from mirisuzanne/one-mixin.scss
THE MOST POWERFUL SASS MIXIN EVAR.
// Apply any css property/value pair.
@mixin css(
$azimuth: null,
$background: null,
$background-attachment: null,
$background-color: null,
$background-image: null,
$background-position: null,
$background-repeat: null,
$border: null,
@maxw3st
maxw3st / dabblet.css
Created October 8, 2012 15:21 — forked from lensco/dabblet.css
box-shadow vs filter: drop-shadow 2
/**
* box-shadow vs filter: drop-shadow 2
*/
body {
background: #ddd;
font: 16px/1 sans-serif;
margin: 50px;
}