// Anonymous function
var spy = sinon.spy();
// Anonymous named function
var spy = sinon.spy().named('a callback');
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Peaks.js Demo Page</title> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<div id="titles"> |
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 audioContext = new AudioContext(); | |
const audioUrl = '/example.mp3'; | |
// Load audio file into audio buffer | |
const response = await fetch(audioUrl); | |
const audioData = await response.arrayBuffer(); | |
const audioBuffer = await audioContext.decodeAudioData(audioData); | |
// Create Peaks.js custom player object, using Howler.js |
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 amazonlinux:1 | |
RUN yum -y update | |
RUN yum -y install make wget tar gcc gcc-c++ file diffutils | |
RUN wget https://cmake.org/files/v3.7/cmake-3.7.2.tar.gz && \ | |
tar -xzvf cmake-3.7.2.tar.gz && cd cmake-3.7.2 && \ | |
./bootstrap && make && make install | |
RUN yum -y install cmake autogen automake libtool \ | |
gzip zip libcurl-devel zlib-static libpng-static xz git \ | |
boost-static boost-devel \ | |
bzip2-devel which gd-devel |
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 amazonlinux:latest | |
RUN yum -y install make cmake3 autogen automake libtool gcc gcc-c++ wget tar gzip zip gd-devel flac-devel libvorbis-devel boost-devel libcurl-devel | |
# libid3tag | |
WORKDIR /root | |
RUN wget https://netix.dl.sourceforge.net/project/mad/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz | |
RUN tar xzf libid3tag-0.15.1b.tar.gz | |
WORKDIR /root/libid3tag-0.15.1b | |
RUN ./configure && make && make install |
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
module.exports = { | |
"env": { | |
"browser": true, | |
"amd": true | |
}, | |
"extends": "eslint:recommended", | |
"rules": { | |
"array-bracket-spacing": ["error", "never"], | |
"brace-style": ["error", "stroustrup"], | |
"block-scoped-var": "error", |
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
convert <input-file> \( +clone -background black -shadow 30x8+0+0 \) +swap -background none -layers merge +repage <output-file> |
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
robocopy D:\ Z:\BackupDir /MIR /XD "$RECYCLE.BIN" "System Volume Information" /FFT |
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
[alias] | |
co = checkout | |
st = status | |
dif = diff | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
wd = diff --word-diff | |
[color] | |
ui = 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
Show hidden characters
{ | |
// Controls auto pairing of quotes, brackets etc | |
"auto_match_enabled": false, | |
// Sets the colors used within the text area | |
"color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme", | |
// Set to true to ensure the last line of the file ends in a newline | |
// character when saving | |
"ensure_newline_at_eof_on_save": true, |
NewerOlder