Skip to content

Instantly share code, notes, and snippets.

View nikolayemrikh's full-sized avatar

Nikolay Emrikh nikolayemrikh

View GitHub Profile
@nikolayemrikh
nikolayemrikh / html-academy-projects.md
Last active October 2, 2022 16:14
HTML Academy projects Nikolay Emrikh

Full cycle of design, development and maintain of various applications/services from backend to frontend

Projects:

  1. Console that mimics the functionality of the browser console (https://github.com/htmlacademy/console.js)

SPA (pure JS) Used (possibly still used) in some interactive tasks and demonstrations to display the results of the student's code Functionality: the ability to input and output, displays objects like in a browser Contribution: writing from scratch, deploy, maintain

@nikolayemrikh
nikolayemrikh / index.html
Last active October 19, 2021 13:57 — forked from karelskopek/index.html
Map/filter vs. reduce #jsbench #jsperf (https://jsbench.github.io/#ce766dceea03e522cc2d72ba25c63ab7) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Map/filter vs. reduce #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@nikolayemrikh
nikolayemrikh / bash.sh
Last active January 3, 2025 12:37
Calculate SHA-1 hash GitHub API v3 way
git hash-object ./file
# or
git hash-object -t blob
# or
cat ./file | git hash-object --stdin
@nikolayemrikh
nikolayemrikh / lighthouse-report.json
Created February 6, 2019 10:22
Lighthouse report
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/72.0.3617.0 Safari/537.36","environment":{"networkUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3559.0 Safari/537.36","hostUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/72.0.3617.0 Safari/537.36","benchmarkIndex":818},"lighthouseVersion":"4.1.0","fetchTime":"2019-02-06T10:18:25.638Z","requestedUrl":"http://localhost:6401/courses/1/run/1","finalUrl":"http://localhost:6401/courses/1/run/1","runWarnings":[],"runtimeError":{"code":"NO_ERROR","message":""},"audits":{"is-on-https":{"id":"is-on-https","title":"Uses HTTPS","description":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for H
@nikolayemrikh
nikolayemrikh / bash
Created December 13, 2018 11:11
log
nemb:courses-packages nikolayemrikh$ npm run dependencies
> [email protected] dependencies /Users/nikolayemrikh/Documents/courses-packages
> lerna bootstrap -- --production
lerna notice cli v3.4.0
lerna info versioning independent
lerna info Bootstrapping 18 packages
lerna info Installing external dependencies
lerna info Symlinking packages and binaries
nemb:courses-packages nikolayemrikh$ npm run check
> [email protected] check /Users/nikolayemrikh/Documents/courses-packages
> cd packages/courses-checks && ./bin/cli.js -vw
(node:7986) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object
at assertPath (path.js:39:11)
at dirname (path.js:1268:5)
at module.exports (/Users/nikolayemrikh/Documents/courses-packages/packages/courses-checks/lib/config/index.js:19:33)
at module.exports (/Users/nikolayemrikh/Documents/courses-packages/packages/courses-checks/lib/cli/index.js:18:18)
for d in *; do cat << EOF > $d/check.client.js; done
'use strict';
const TEST = 123;
module.exports.TEST = TEST;
EOF
HtmlacademyTask.setup(function () {
this.setView(HtmlCssView, function () {
this.setSplitEditor('css');
});
this.setRunner(HtmlCssRunner);
this.setChecker(HtmlCssChecker, function (checker) {
checker.addGoal('goal1', function (dom) {
dom.changeEtalon(function () {
this.reset();
this.css(function () {
@nikolayemrikh
nikolayemrikh / index.html
Created July 15, 2018 12:04
Connect console with propmt in editor
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>console.js</title>
<link href="//htmlacademy.github.io/console.js/latest/css/style.css" rel="stylesheet">
<link href="//htmlacademy.github.io/console.js/latest/css/prism.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<style>
html,
@nikolayemrikh
nikolayemrikh / magic.js
Last active June 26, 2018 19:53
Bypass strict mode with Indirect eval call!
function vu () {
"use strict";
eval('var a = 1;');
console.log(a);
}
vu(); // Uncaught ReferenceError: a is not defined
function fu () {
"use strict";
(1,eval)('var b = 1;')