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 () { | |
'use strict'; | |
var str = window.navigator.userAgent, | |
ie11 = /Trident\/7\.0/, | |
docMode8 = /MSIE 8\.0/; | |
if (ie11.test(str) && docMode8.test(str)) { | |
$('<link/>', { | |
rel: 'stylesheet', | |
type: 'text/css', |
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 lang="en" ng-app="app"> | |
<head> | |
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> | |
<head> | |
<title>Angular Template Example</title> | |
<style> | |
.viewer {width:240px;height:280px;margin:10px;float:left;border:1px solid red} | |
.viewer nav {width:100%;height:50px;border:1px solid green} | |
.viewer nav a {width:30px;height:30px;float:left;margin:5px;border:1px solid orange} |
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 lang="en"> | |
<head> | |
<title>Underscore Template Example</title> | |
<meta charset="utf-8"> | |
<style> | |
.viewer {width:240px;height:280px;margin:10px;float:left;border:1px solid red} | |
.viewer nav {width:100%;height:50px;border:1px solid green} | |
.viewer nav a {width:30px;height:30px;float:left;margin:5px;border:1px solid orange} | |
.viewer aside {width:106px;height:210px;margin:5px 0 0;border:1px solid purple} |
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 lang="en"> | |
<head> | |
<title>Template Example</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<section id="placeholder0"></section> | |
<section id="placeholder1"></section> |
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 RgbToHsv(r, g, b) { | |
var min = Math.min(r, g, b), | |
max = Math.max(r, g, b), | |
delta = max - min, | |
h, s, v = max; | |
v = Math.floor(max / 255 * 100); | |
if (max == 0) return {h: 0, s: 0, v: 0}; | |
s = Math.floor(delta / max * 100); | |
var deltadiv = delta == 0 ? 1 : delta; |
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 img = document.createElement('img'); | |
path = encodeURIComponent('https://s3.amazonaws.com/llama0/burningfiremonkey.gif'), | |
width = 600, | |
refresh = 2592000; | |
img.src = 'https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy?url=' + path + '&resize_w=' + width + '&container=focus&refresh=' + refresh; | |
document.body.appendChild(img); | |
}()); |
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> | |
<title>Calendar Puzzle</title> | |
<style> | |
.mark {border-top:1px solid red;width:400px;height:30px;} | |
.time {float:left} | |
.event {left:100px;position:absolute;opacity:.4;color:#fff} | |
.event {background:red;width:302px;} | |
/*.event + .event {background:green;width:150px;left:252px;}*/ |
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 lang="en" ng-app="app"> | |
<head> | |
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> | |
<head> | |
<title>Angular</title> | |
</head> | |
<body> | |
<a href="#!/">Home</a> | <a href="#!/test">Test</a> | |
<div ng-view></div> |
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 lang="en"> | |
<head> | |
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> | |
<head> | |
<title>Backbone</title> | |
</head> | |
<body> | |
<header></header> |
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
var stagify = function () { | |
if (window.location.search.search('staging=true') !== -1) { | |
$('html') | |
.addClass('staging') | |
.find('a').each(function () { | |
var h = $(this).attr('href'), | |
q = !!h && h.search(/\?/) !== -1 ? '&': '?'; | |
if (!!h && h.search('#') === -1) { | |
$(this).attr('href', h + q + 'staging=true'); | |
} |