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
grunt.registerMultiTask('css', function (arg1, arg2) { | |
var fs = require('fs') | |
, path = require('path') | |
, options = (arguments.length > 0 && this.data[arg1] && this.data[arg1].options) | |
? this.data[arg1].options | |
: this.data.dist.options | |
, theme = (arguments.length > 1) ? arg2 : null | |
, themeFolder = this.data.options.themeFolder || 'themes' | |
, themeList = fs.readdirSync(path.resolve(themeFolder)) | |
, sassConfig = {} |
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
void setup() { | |
// ... | |
setTimeout(function() { | |
bounceSound.amp(.3); | |
bounceSound.play(); | |
}, 1000); | |
setTimeout(function() { | |
bounceSound.amp(.3); | |
bounceSound.play(); | |
bounceSound.play(); |
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
const marky = require('marky-markdown'), | |
touch = require('touch'), | |
fs = require('fs'); | |
const template = fs.readFileSync('./template.html', 'utf8'); | |
function reportCard(name, mtime) { | |
const fileCol = name + Array(33).join(' ').slice(name.length); | |
const date = mtime.toDateString(); // mtime.getFullYear() + '-' + mtime.getMonth() + '-' + mtime.getDate(); | |
console.log(' $ ' + fileCol + date); |
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
// package.json dependency: | |
// "ct-quadtree": "git://github.com/crhallberg/QuadTree.git#save-load" | |
const { QuadTree, Rectangle, Point } = require("ct-quadtree"); | |
function benchmark(msg, func) { | |
const NS_PER_SEC = 1e9; | |
console.log(msg); | |
const start = process.hrtime(); | |
let ret = func(); | |
const diff = process.hrtime(start); |
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
console.log("Hello, Falvey!!"); | |
// JS will ignore this | |
let MULCH = 2; | |
let INCHES_IN_A_YARD = 36 * 36 * 36; | |
function doCalculations(garden) { | |
// We want 2 inches of mulch | |
garden.mulchDepth = MULCH; | |
garden.compostDepth = garden.fillDepth - MULCH; |
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"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<main> | |
<h1>Villanova University</h1> |
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
print("Hello, world!") | |
# Python will ignore this | |
PPI = 400 | |
def calc_width(book): | |
paper_width = book["pages"] / PPI # inches | |
cover_width = 0 | |
if book["binding"] == "Hardcover": |
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 some useful values at the top (Constants) | |
let MULCH = 2; | |
let INCHES_IN_A_YARD = 36 * 36 * 36; | |
// Make Variables to add up all of the yards. | |
let mulchTotal = 0; | |
let compostTotal = 0; | |
// Create a Function to calculate the yards of compost and mulch. | |
// This Function allows us to reuse the code within whenever we want. |