This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Example: A simple list component with each item as a block one below other with some padding and border. | |
--> | |
<!-- Atomic CSS --> | |
<ul class="MB(baseSpacing) Bgc(#0280ae)"> | |
<li class="P(halfBaseSpacing) BdB(1px)"></li> | |
... | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
function getObjectFromExpression(expr) { | |
var splits = expr.split('.'), | |
obj, propertyName; | |
if (splits.length === 1) { | |
obj = window; | |
propertyName = splits[0]; | |
} else { | |
obj = splits.slice(0, splits.length - 1).reduce(function (obj, key) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Changes XML to JSON | |
* Modified version from here: http://davidwalsh.name/convert-xml-json | |
* @param {string} xml XML DOM tree | |
*/ | |
function xmlToJson(xml) { | |
// Create the return object | |
var obj = {}; | |
if (xml.nodeType == 1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* PATCH to make React work with custom attributes. | |
* | |
*/ | |
HTMLDOMPropertyConfig.isCustomAttribute = function(attr) { | |
// Strip off custom attributes React puts for its working. | |
if ({children: 1}[attr]) { return false; } | |
// Take any attribute (with correct syntax) as custom attribute. |
This will be something I have not done since my school times - getting up early.
- 6.00 AM: Get up
- 6.20 AM: Leave for park with a Football. I'll practise juggling this whole month.
- 7.20 - 6.35 AM: Get back home and do pranayaam.
- 7.35 - 7.45 AM - Relax.
- 7.45 AM (8.12 AM) - Take bath.
- 8 AM (8.30 AM) - Have breakfast.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Run this in your developer console on a website with jQuery on it | |
*/ | |
(function(){$('head').append('<link type="text/css" rel="stylesheet" href="http://daneden.me/animate/animate.css">'); | |
var d=$('div'),i=d.length;while(i--){ | |
(function(){ | |
var e=d[i]; | |
setTimeout(function() { $(e).addClass('animated wobble'); }, i%80*400); | |
})(); |
NewerOlder