This is a SCRIPT-8 cassette.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Declarative React Layouts by Rozario Chivers</title> | |
<style> | |
body { | |
font-family: arial; | |
counter-reset: component-counter; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style> | |
body { | |
font-family: arial; | |
counter-reset: component-counter; |
This is a SCRIPT-8 cassette.
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
import Ember from 'ember'; | |
import hbs from 'htmlbars-inline-precompile'; | |
import { connect } from 'ember-redux'; | |
const stateToComputed = state => { | |
return { | |
number: state.number | |
}; | |
}; |
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
// 1. JS Namespacing | |
if (typeof mynamespace != "object") { var mynamespace = {}; } | |
mynamespace.component = function() { | |
// component safely nestled within a namespace | |
}; | |
// 2. get a class name from multiples | |
$("#content").attr("class").split(" ")[0]; | |
// 3. argument defaulting |
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() { | |
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; | |
po.src = 'https://apis.google.com/js/plusone.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); | |
})(); |
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
<?php | |
$deviceClass = ""; | |
if (ereg('iPhone',$_SERVER['HTTP_USER_AGENT']) || ereg('iPod',$_SERVER['HTTP_USER_AGENT'])) { | |
$deviceClass = "ui-iphone"; | |
} else if (ereg('iPad',$_SERVER['HTTP_USER_AGENT'])) { | |
$deviceClass = "ui-ipad"; | |
} else if (ereg('Android',$_SERVER['HTTP_USER_AGENT']) && ereg('Mobile Safari',$_SERVER['HTTP_USER_AGENT'])) { | |
$deviceClass = "ui-android"; | |
}; | |
?> |
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
/* | |
* Module pattern (public and private members within a namespace) | |
* Creates chassis.example namespace | |
* Note: ; before parenthesis is deliberate | |
* | |
* Below is an example of a flexible multi-part module that can be loaded | |
* in any order with loose augmentation. | |
* | |
*/ |
NewerOlder