#!/usr/bin/env bash
# Assuming OS X Yosemite 10.10.4
# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 WAVE={}; | |
(function(){ | |
function str16(x){return (x>15)?x.toString(16):"0"+x.toString(16);} | |
function shortToStr(x){return "%"+str16(x&0xff)+"%"+str16((x>>>8)&0xff);} | |
function intToStr(x){return "%"+str16(x&0xff)+"%"+str16((x>>>8)&0xff)+"%"+str16((x>>>16)&0xff)+"%"+str16((x>>>24)&0xff);} | |
WAVE.makeWavDecimal=function(channels,sampleFrequency) | |
{ | |
var str="data:audio/x-wav,%52%49%46%46"+ | |
intToStr(channels.length*2*channels[0].length+0x24)+ | |
"%57%41%56%45%66%6D%74%20"+ |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
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> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script> | |
<script src="http://www.skulpt.org/js/skulpt.min.js" type="text/javascript"></script> | |
<script src="http://www.skulpt.org/js/skulpt-stdlib.js" type="text/javascript"></script> | |
</head> | |
<body> |