Skip to content

Instantly share code, notes, and snippets.

@andrIvash
andrIvash / index.html
Created October 6, 2020 19:04 — forked from tomeustace/index.html
d3 v4 translateBy, scaleBy and scaleTo example usage
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.view {
fill: blue;
stroke: #000;
}
</style>

Set up git editor

The main command is:

git config --global core.editor "path to your editor with params"

Set up an editor and check it by making a commit:

@andrIvash
andrIvash / google_translate.html
Created January 31, 2019 18:10 — forked from carolineschnapp/google_translate.html
Google Translate Embed Code
<div id="google_translate_element"></div>
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script>
<script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
@andrIvash
andrIvash / 1.rreaddir.js
Created January 12, 2019 16:49 — forked from timoxley/1.rreaddir.js
async/await recursive fs readdir
import { join } from 'path'
import { readdir, stat } from 'fs-promise'
async function rreaddir (dir, allFiles = []) {
const files = (await readdir(dir)).map(f => join(dir, f))
allFiles.push(...files)
await Promise.all(files.map(async f => (
(await stat(f)).isDirectory() && rreaddir(f, allFiles)
)))
return allFiles
@andrIvash
andrIvash / test-task.md
Created September 12, 2018 07:17 — forked from krambertech/test-task.md
Intern / Junior Front-End Developer Position @ Youscan : Test Task

Test Task for Intern / Junior Front-End Developer Position @ Youscan

Основная задача тестового не узнать как сильно вы знаете React, а посмотреть насколько хорошо вы сможете разобраться с новыми технологиями в относительно короткий срок. В идеале, на него нужно потратить не более 3 дней. А так - делайте сколько делается, пока мы не закроем вакансию ;)

Описание

Нужно написать одностраничное приложения для просмотра фильмов с помощью The Movie Database API.

При открытии приложения, должен отображаться список популярных фильмов с пагинацией или динамической подгрузкой (на выбор). Также на странице должно быть поле для поиска. Когда ты вводишь туда какой-то текст, должны отобразиться фильмы которые ему соответствуют. Для каждого фильма в списке должен отображаться список жанров (названий жанров, не айдишек), к которым он принадлежит.

@andrIvash
andrIvash / node-setup-pm2-nginx.md
Created June 17, 2018 12:02 — forked from tomysmile/node-setup-pm2-nginx.md
Setup NodeJS Production with PM2, Nginx in Ubuntu 16.04

How To Set Up a Node.js Application for Production on Ubuntu 16.04

with PM2 & Nginx

Create User

as a root, run below commands on server:

# adduser tomy
@andrIvash
andrIvash / node-npm-install.md
Created January 17, 2018 11:15 — forked from rcugut/node-npm-install.md
Install node & npm on Mac OS X with Homebrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

@andrIvash
andrIvash / multiple_ssh_setting.md
Created January 11, 2018 08:25 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@andrIvash
andrIvash / app.js
Created July 13, 2017 20:49 — forked from dstroot/app.js
Gulp, BrowserSync, Node, and Nodemon all working in harmony. ;)
/**
* World's simplest express server
* - used to serve index.html from /public
*/
var express = require('express');
var serveStatic = require('serve-static');
var app = express();
app.use(serveStatic(__dirname + '/public'));
@andrIvash
andrIvash / 0_reuse_code.js
Created January 31, 2017 12:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console