Skip to content

Instantly share code, notes, and snippets.

View VingeB0's full-sized avatar
📉
front-end power

Volodymyr Davii VingeB0

📉
front-end power
View GitHub Profile
@VingeB0
VingeB0 / gist:1a748eec4c4c605431c1f3d3c41b8481
Created November 11, 2020 12:56
webstorm sort css properties
content,
counter-increment,
counter-reset,
position,
top, right, bottom, left,
transform, transform-origin,
import * as THREE from 'three';
import GLTFLoader from 'three/examples/js/loaders/GLTFLoader.js';
// import { DRACOLoader } from 'three';
import PhoneModel from './../public/assets/models/phone3d.glb';
var camera, scene, renderer;
var geometry, material, mesh;
init();
animate();
murkup
css3, sass/Scss, less, grids, flexbox
html5, pug, , email markup, BEM
canvas, svg
font-end
js, es5-8, jquery,
react, react native
vuejs, vuex, weex
angular2+, ionic, typescript
gulp, webpack
bind возвращает новую ф-ю обертку
полифил bind
funtionc bind(cb, context) {
return function() {
return cb.apply(context, arguments)
}
}
как сделать чтобы вывелось с 1 до 10
required - ansi,
http,
fs(readFile, readFileSync, writeFile, writeFileSync, appendFile, appendFileSync, (createWriteStream - write, end), createReadStream(on) ),
os,
events(emitter = new Emitter(), emitter.on, emitter.emit),
until(util.inherits(User, EventEmitter))
zlip
module - is a file and it have local variables
@VingeB0
VingeB0 / react
Last active June 30, 2018 19:18
react
Важное замечание: PureComponent нужно использовать только для так называемых presentational components, т.е. для тех компонент, которые НЕ обёрнуты в вызов redux connect().
Функция componentWillMount, вместо которой предлагается использовать componentDidMount.
Функция componentWillUpdate, которую заменит componentDidUpdate.
Функция componentWillReceiveProps . В качестве заменителя этой функции предлагается новая статическая функция getDerivedStateFromProps.
В свете вышесказанного не стоит впадать в панику, так как эти функции всё ещё можно использовать. Уведомления о том, что данные функции устарели, появятся в React 16.4, а их удаление запланировано в 17-й версии React.
для пересоздания обьекта (не ререндер) можно поменять ключ, key + 1 и он пересоздастся
@VingeB0
VingeB0 / react flux - simple example counter
Created February 7, 2018 16:22
react flux - simple example counter
import React, {Component} from 'react';
import logo from './logo.svg';
import './App.css';
import {EventEmitter} from 'events';
import {Dispatcher} from 'flux';
const AppDispatcher = new Dispatcher();
const CHANGE_EVENT = 'CHANGE';
@VingeB0
VingeB0 / gist:3fd2334ad46c4fefeecbce4a5a89f388
Last active November 12, 2018 09:14
css заметки

.parent { height: auto; width: 200px; border: 1px solid red; }

.child { padding-top: 100%; border: 1px solid blue; }