Skip to content

Instantly share code, notes, and snippets.

View craigdanj's full-sized avatar

Craig Johnson craigdanj

  • Pune, Maharashtra
View GitHub Profile
import style from './style/css';
function postTitle() {
return <h1 className={style.postTitle}></h1>;
}
<html>
<head>
<title>Foo Bar</title>
</head>
<body>
<h1>Foo Bar</h1>
<a href=”/baz”>Baz</a>
</body>
</html>
@craigdanj
craigdanj / README.md
Last active August 29, 2015 14:21 — forked from addyosmani/README.md

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@craigdanj
craigdanj / typeCheck.md
Last active August 29, 2015 14:21
Type checking in Javascript.
    //Function to check type in JS.
    function typeCheck(x) {
        return Object.prototype.toString.call(x);
    }

    //Test Code:
    var x;
    var y = null;