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{ width: 300px; height: 300px;}*/ | |
</style> | |
</head> | |
<body> | |
<canvas id="canvas" width="300" height="300"></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
<!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); |
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> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
</head> | |
<body> | |
<script> | |
// https://coderwall.com/p/duapqq |
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
{ | |
"devel": false, | |
"undef": true | |
} |
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
set runtimepath^=~/Dropbox/vim/.vim | |
source ~/Dropbox/vim/.vimrc |