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
Show hidden characters
{ | |
"color_scheme": "Packages/User/Monokai (SL).tmTheme", | |
"font_size": 14, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"draw_white_space": "all" |
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 loc = location.href; | |
var baseurl = loc.substring(0,loc.lastIndexOf('/')); |
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
<html> | |
<head> | |
<style type="text/css"> | |
canvas{ border:#666 1px solid;} | |
</style> | |
</head> | |
<body> | |
<script type ="application/javascript" language="javascript"> | |
// requestAnim shim layer by Paul Irish |
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
<html> | |
<head> | |
<style type="text/css"> | |
#anim { | |
position:absolute; | |
left:0px; | |
width:150px; | |
height:150px; | |
background: blue; | |
font-size: larger; |
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"> | |
<title>Bouncing 1</title> | |
<link rel="stylesheet" href="./include/style.css"> | |
</head> | |
<body> | |
<canvas id="canvas" width="400" height="400"></canvas> |
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
// A Module Pattern | |
PACKAGE_NAME.M = (function () { | |
var privatePropertyOrMethod1 = …; | |
// … | |
var M = {}; | |
M.publicProperty1 = …; | |
M.publicMethod1 = function (…) {…}; |
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
// Type Pattern | |
<package>.T = (function () { | |
var T = {}; | |
// Shared properties and methods go here | |
T.create = function (…) { | |
vart = Object.create(this); | |
// Assign the own properties here |
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
// from: http://stackoverflow.com/a/7731878 | |
$.extend({ | |
getUrlVars: function() { | |
var vars = [], | |
hash; | |
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); | |
for (var i = 0; i < hashes.length; i++) { | |
hash = hashes[i].split('='); | |
vars.push(hash[0]); |
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
window.onload = function () { | |
var messages = [], | |
socket = io.connect(window.location.origin), | |
display = document.getElementsByTagName('output')[0], | |
button = document.getElementsByTagName('button')[0], | |
content = document.getElementById('msg'); | |
socket.on('message', function (data) { | |
if (data.message) { | |
messages.push(data.message); |
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></title> | |
<style> | |
body { | |
padding-top: 200px; | |
} | |
input::after { | |
content: attr(data-value) '/' attr(max); |
OlderNewer