Skip to content

Instantly share code, notes, and snippets.

View fiWhy's full-sized avatar
💭
Monday starts on saturday

Denys fiWhy

💭
Monday starts on saturday
View GitHub Profile
@fiWhy
fiWhy / constructor.js
Created July 24, 2020 10:10
Function Constructor
const grades = {
Junior: 'junior',
Middle: 'middle',
Senior: 'senior',
};
const bonuses = {
'C++': 100,
Rust: 150,
default: 50,
@fiWhy
fiWhy / tuner.js
Created July 23, 2020 14:09 — forked from eric-wood/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 July 19, 2020 12:21
witch-house
const magicBook = {
recipes: {
golem: {
bone: 10,
stone: 100,
nail: 100,
poo: 53
},
littleDevil: {
lava: 10,
@fiWhy
fiWhy / functions.spec.js
Created July 9, 2020 18:36
Mocha Spec File
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 July 9, 2020 18:35
Mocha installing
<!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"