Skip to content

Instantly share code, notes, and snippets.

View iegik's full-sized avatar
🧾
Looking for work

Arturs Jansons iegik

🧾
Looking for work
View GitHub Profile
@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

@iegik
iegik / ionic.md
Last active January 27, 2021 07:43

Ionic/Capacitor

Add ionic to existing app

ionic init

choose your js fasmework

@iegik
iegik / CORDOVA.md
Last active September 13, 2022 10:25

Setup

npm install -g cordova
cordova config set -g telemetry false
cordova create my-app && cd my-app
JAVA_HOME=`/usr/libexec/java_home -v 1.8` cordova requirements android
cordova platform add android
cordova build android
@iegik
iegik / bash-search.sh
Created February 12, 2020 14:35
Bash search script
#!/bin/bash
# grep -sinE $1 --color -R ./* > $2; wc -l $2;
TEXT=$1
FILE=$2
grep -sinE $TEXT -R ./* | awk -F":" '{ print "name: "$1"\nline: "$2"\ncontent "$3"\ninfo: \""; system("stat -nf\"%z, %B %m\" "$1); print "\"\n"}' > $FILE;
grep "name: " $FILE | wc -l;