This file contains hidden or 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> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
This file contains hidden or 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> | |
</head> | |
<body> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/blissfuljs/1.0.2/bliss.min.js"></script> | |
<script src="https://cdn.rawgit.com/zloirock/core-js/master/client/shim.min.js"></script> |
This file contains hidden or 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
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
set splitbelow | |
set splitright | |
let g:auto_save = 1 | |
set relativenumber |
This file contains hidden or 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
CHOKIDAR_USEPOLLING=true |
This file contains hidden or 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
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
# Runtime data | |
pids | |
*.pid | |
*.seed |
This file contains hidden or 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
{ | |
"name": "react-app", | |
"version": "1.0.0", | |
"description": "react application", | |
"scripts": { | |
"build": "browserify ./src/app.jsx -o ./public/app.js -t babelify", | |
"watch": "watchify ./src/app.jsx -o ./public/app.js -t babelify -v" | |
}, | |
"dependencies": { | |
"babel-preset-es2015": "6.9.0", |
This file contains hidden or 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 loadImages(imagesToBeLoaded, drawCallback) { | |
var imagesLoaded = {}; | |
var loadedImages = 0; | |
var numberOfImagesToLoad = 0; | |
// get num of images to load | |
for(var name in imagesToBeLoaded) { | |
numberOfImagesToLoad++; | |
} | |
for(var name in imagesToBeLoaded) { | |
imagesLoaded[name] = new Image(); |
This file contains hidden or 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 loadImages(imagesToBeLoaded, drawCallback) { | |
var imagesLoaded = {}; | |
var loadedImages = 0; | |
var numberOfImagesToLoad = 0; | |
// get num of images to load | |
for(var name in imagesToBeLoaded) { | |
numberOfImagesToLoad++; | |
} | |
for(var name in imagesToBeLoaded) { | |
imagesLoaded[name] = new Image(); |
This file contains hidden or 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
// n = number of cells per row/column | |
function drawCheckboard(n) { | |
grdFrenchFlag = ctx.createLinearGradient(0, 0, 300, 200); | |
grdFrenchFlag.addColorStop(0, "blue"); | |
grdFrenchFlag.addColorStop(0.5, "white"); | |
grdFrenchFlag.addColorStop(1, "red"); | |
ctx.fillStyle = grdFrenchFlag; | |
var l = canvas.width; |
This file contains hidden or 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 checkCashRegister(price, cash, cid) { | |
var change = cash - price; | |
console.log('change: ' + change); | |
var cashInDrawer = function() { | |
var tot = 0; | |
cid.forEach(function(curr) { | |
tot = tot + curr[1] | |
// console.log(curr[1]) |