Skip to content

Instantly share code, notes, and snippets.

View iegik's full-sized avatar
🏠
Working from home

Arturs Jansons iegik

🏠
Working from home
View GitHub Profile
@iegik
iegik / README.md
Last active September 16, 2022 08:12

_

@iegik
iegik / README.md
Last active November 17, 2022 10:24

Node.JS

Install

brew unlink node
brew unlink npm
brew install node@16
brew link --overwrite node@16
@iegik
iegik / CODE.md
Last active February 4, 2023 10:51

Responsive Design for Motion

MacOS: Settings > Accessibility -> Select Motion -> Reduce Motion.

.bar {
  animation-name: skew;
}
@media screen and (prefers-reduced-motion) {
  .bar {
 transition: none;

Share TTY

On remote screen:

ssh foo@bar

screen -d -m -S shared
@iegik
iegik / LXC.md
Last active February 11, 2021 09:18
@iegik
iegik / REACT.md
Last active January 29, 2021 17:41

Presentational and Container Components

Dumb (stateless) and Smart components

Dumb:

import React from 'react';
export default (props = {}) => (
    <View/>
)
## Node.js
node () { docker run -it -u $(id -u) -v "$PWD":/usr/src/app -w /usr/src/app --rm node:4 node $@; }
npm () { docker run -it -u $(id -u) -v "$PWD":/usr/src/app -v $HOME/.npm:/.npm -w /usr/src/app --rm node:4 npm $@; }

Before rafactoring, clean the code base

  1. Use Git
  2. Choose your style guide and use linters
  3. Create graph and clean dead code
  4. Determinate code duplication, use patterns

Git

Using git saves time to find a bug, by code author or feature