Skip to content

Instantly share code, notes, and snippets.

View korzio's full-sized avatar

Alex Korzhikov korzio

View GitHub Profile
@korzio
korzio / links.html
Last active April 12, 2018 18:14
links.html
@korzio
korzio / defineProperty.html
Created April 17, 2018 17:59
defineProperty.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script>
HandleScope handle_scope(isolate);
Local<Context> context = NewContext(isolate);
Context::Scope context_scope(context);
Environment env(isolate_data, context, v8_platform.GetTracingAgent());
env.Start(argc, argv, exec_argc, exec_argv, v8_is_profiling);
{
Environment::AsyncCallbackScope callback_scope(&env);
env.async_hooks()->push_async_ids(1, 0);
@korzio
korzio / test.md
Last active December 28, 2018 10:57
test

hello


world

@korzio
korzio / copy_bookmarks.js
Created January 8, 2019 17:55
copy chrome bookmarks as links to markdown
// select #list in DevTools
// execute in console
copy([...$0.children].filter(a => a.tagName.toLowerCase() === 'bookmarks-item').map(a => `[${a.$['website-title'].innerText}](${a.$['website-url'].innerText})`).join(''))
@korzio
korzio / npm-help.sh
Last active January 15, 2019 21:00
medium-basic-npm-help.sh
npm --help
npm -h
npm help
npm
@korzio
korzio / medium-basic-help-test.feature
Created January 15, 2019 21:02
medium-basic-help-test
When a user enters "my-cli" program with "help" option (or without arguments)
Then it shows a help message about the program
@korzio
korzio / medium-basic-npm-version.sh
Created January 15, 2019 21:04
medium-basic-npm-version
npm -v
npm --version
git --version
@korzio
korzio / medium-basic-version-test.feature
Created January 15, 2019 21:06
medium-basic-version-test
When user enters "my-cli" program with "version" option
Then it shows the actual program's version
@korzio
korzio / medium-basic-create.sh
Created January 15, 2019 21:10
medium-basic-create.sh
mkdir my-cli # create the project's directory
cd my-cli # go to new location
npm init --yes # initialise NPM package
echo "console.log('Hello, world!')" > server.js # create hello world example
npm start # run the script