Skip to content

Instantly share code, notes, and snippets.

View vitaliy-kravchenko-dev's full-sized avatar

Vitaliy Kravchenko vitaliy-kravchenko-dev

View GitHub Profile

List of libraries

  • http://fabricjs.com/ - has a lot of plugins and open-source modifications. Possible to achieve most of businnes requirements. Has ability to manage data throught JSON or SVG. Touch devices support. Possible to run under Node.js
  • https://www.createjs.com/easeljs - games oriented library. Is a part of CreateJS framework. Has a lot of profitable functionality around animation, sounds integration and performance.
  • http://paperjs.org/ - animation oriented library. Good performance optimization.
  • https://konvajs.github.io/ - canvas extender like FabricJS. Good performance even on the mobile. Support layers and stages. Possible to redraw image by layers. Has ability to manage Stage from\to JSON.
  • http://pixijs.io/ - it is a flexible 2D WebGL renderer. Unbeatable performance, intuitive API, globally used. Complex framework.
  • https://threejs.org/ - popular framework for games and complex animation in the Web.

Plugins for FabricJS

@mixin flex-grid-items($cols) {
display: flex;
flex-wrap: wrap;
> * {
$item-width: 100% / $cols;
width: $item-width;
box-sizing: border-box;
}
}
@vitaliy-kravchenko-dev
vitaliy-kravchenko-dev / index.js
Last active February 13, 2018 15:54
Example of GNU GPLv2 license header
/**
* Copyright 2018 <NAME>
* This file is part of <APP>.
*
* <APP> is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* <APP> is distributed in the hope that it will be useful,
@vitaliy-kravchenko-dev
vitaliy-kravchenko-dev / npm_readme.md
Last active May 16, 2018 13:39
NPM usefull commands

Show list of dependencies with versions

npm list --depth=0

Show list of outdated dependencies with versions

npm outdated --depth=0

@vitaliy-kravchenko-dev
vitaliy-kravchenko-dev / goggle-maps-extract-city-country.js
Created May 17, 2018 13:46
Extract city and country from Google maps API response - geocoder.geocode()
getCityCountry(results) {
const location: any = {};
for (const component of results[0].address_components) {
if (component.types.includes('sublocality') || component.types.includes('locality')) {
location.city = component.long_name;
} else if (component.types.includes('administrative_area_level_1')) {
location.state = component.short_name;
} else if (component.types.includes('country')) {
location.country = component.long_name;
@vitaliy-kravchenko-dev
vitaliy-kravchenko-dev / git_usefull_command.md
Last active April 30, 2019 10:25
Git & NPM- Useful commands

Clean up already merged branches

Local cleaning

git branch -r --merged | egrep -v "(^\*|master|dev|release|staging)" | xargs git branch -d

Remove local branches which don't have remote origin

git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done Found on Stackoverflow - https://stackoverflow.com/a/33548037

Remote delete

git branch -r --merged | egrep -v "(^\*|master|dev|release|staging)" | sed 's/origin\///' | xargs -n 1 git push --delete origin

@vitaliy-kravchenko-dev
vitaliy-kravchenko-dev / cmd_commands.md
Last active August 6, 2018 12:06
Find process who blocks port
netstat -a -n -o | find "443"
tasklist /svc /FI "PID eq 37400"
@vitaliy-kravchenko-dev
vitaliy-kravchenko-dev / apps-list.md
Last active October 29, 2018 14:44
Useful solutions
@vitaliy-kravchenko-dev
vitaliy-kravchenko-dev / console-save.js
Created April 26, 2019 15:41
Extend Console object with new Save function.
// Source
// http://bgrins.github.io/devtools-snippets/#console-save
(function(console){
console.save = function(data, filename){
if(!data) {
console.error('Console.save: No data')
return;