Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Monday starts on saturday

Denys fiWhy

💭
Monday starts on saturday
View GitHub Profile
@fiWhy
fiWhy / constructor.js
Created Jul 24, 2020
Function Constructor
View constructor.js
const grades = {
Junior: 'junior',
Middle: 'middle',
Senior: 'senior',
};
const bonuses = {
'C++': 100,
Rust: 150,
default: 50,
View tuner.js
window.AudioContext = window.AudioContext || window.webkitAudioContext;
var context = new AudioContext();
var analyser = context.createAnalyser();
var source;
var freqData;
var samples = 128;
var initStream = function(stream) {
analyser.fftSize = samples;
@fiWhy
fiWhy / witch-house.js
Last active Jul 19, 2020
witch-house
View witch-house.js
const magicBook = {
recipes: {
golem: {
bone: 10,
stone: 100,
nail: 100,
poo: 53
},
littleDevil: {
lava: 10,
View functions.spec.js
describe('createMonster', () => {
it('should create monster object', () => {
const monster = {
id: 1,
userId: 1,
name: 'Ktulhu',
superpower: 'Oops',
area: 'Cave',
};
expect(createMonster(1, 'Ktulhu', 'Oops', 'Cave')).to.deep.equal(monster);
@fiWhy
fiWhy / index.html
Last active Jul 9, 2020
Mocha installing
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Functions</title>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/mocha/8.0.1/mocha.min.js"
integrity="sha512-ApK//o0cQFCph3kX20wrHlNzlitDH4TydeGc7yn2OiM2Bymv9abvskmtLcvJ1EmAcgigVteKHAhF/DWY6ybYag=="
crossorigin="anonymous"