Skip to content

Instantly share code, notes, and snippets.

View cfsilence's full-sized avatar

Todd Sharp cfsilence

View GitHub Profile
<video width="320" height="240" controls="controls">
<source src="movie.mp4" type="video/mp4" />
<source src="movie.ogg" type="video/ogg" />
<source src="movie.webm" type="video/webm" />
<object data="movie.mp4" width="320" height="240">
<embed src="movie.swf" width="320" height="240">
Your browser does not support video
</embed>
</object>
</video>
<script>
function AppViewModel() {
this.firstName = "Bert";
this.lastName = "Bertington";
}
ko.applyBindings(new AppViewModel());
</script>
<p>First name: <strong data-bind="text: firstName"></strong></p>
<script>
{
people: [
"Yehuda Katz",
"Alan Johnson",
"Charles Jolley"
]
}
</script>
<script>
var source = $("#entry-template").html();
var template = Handlebars.compile(source);
</script>
<script id="entry-template" type="text/x-handlebars-template">
template content {{boundVar}}
</script>
@cfsilence
cfsilence / gist:3123910
Created July 16, 2012 17:30
laf-jquery-ui-demo
<script>
$(function() {
$( "#dialog-modal" ).dialog({
height: 140,
modal: true
});
});
</script>
<div id="dialog-modal" title="Basic modal dialog">
@cfsilence
cfsilence / gist:3123946
Created July 16, 2012 17:38
laf-bootstrap-ui-demo
<a class="btn" data-toggle="modal" href="#myModal" >Launch Modal</a>
<div class="modal hide" id="myModal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Modal header</h3>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
@cfsilence
cfsilence / gist:3124013
Created July 16, 2012 17:52
laf-extjs-ui-demo
Ext.create('Ext.window.Window', {
title: 'Hello',
height: 200,
width: 400,
layout: 'fit',
items: {
xtype: 'grid',
border: false,
columns: [{header: 'World'}],
store: Ext.create('Ext.data.ArrayStore', {})
@cfsilence
cfsilence / gist:3124014
Created July 16, 2012 17:52
laf-extjs-ui-demo
<script>
Ext.create('Ext.window.Window', {
title: 'Hello',
height: 200,
width: 400,
layout: 'fit',
items: {
xtype: 'grid',
border: false,
columns: [{header: 'World'}],
@cfsilence
cfsilence / gist:3124147
Created July 16, 2012 18:27
laf-canvas-demo
<script type="text/javascript">
function drawShape(){
var canvas = document.getElementById('tutorial');
if (canvas.getContext) {
var ctx = canvas.getContext('2d');
// Draw shapes
ctx.fillRect(25, 25, 100, 100);
ctx.clearRect(45, 45, 60, 60);
ctx.strokeRect(50, 50, 50, 50);
@cfsilence
cfsilence / gist:3124200
Created July 16, 2012 18:33
laf-donatello-demo
<script>
for( var i=0; i < 8; i ++ ) {
var x = Math.cos( i*Math.PI/4 )*r;
var y = Math.sin( i*Math.PI/4 )*r;
var circle = paper.ellipse( 250 + x, 250 + y,
120, 75, {
'stroke-width': 4*i,
'stroke': colors[i%8],
'stroke-style': 'solid'
});