stewartduffy / notebook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dev Notebook

My curated list of dev hacks, notes and fixes. Props to @xemasiv for the idea)

Update all packages from storybook

npx npm-check-updates '/storybook/' -u && npm install

Change port for create-react-app

Change the start script to from

"start": "react-scripts start"

to

"start": "PORT=3006 react-scripts start"

Source

Close single simulator in Xcode

Select Simulator.. Go into File Menu -> Close window or press [Command + W ]. It will close the simulator which is on top. Source

React Native expo changes not reloaded

rm .git/index.lock

Source

Safe CSS Defaults

Property Value
background "transparent (transparent stands for rgba(0, 0, 0, 0)) or none or 0 0"
border none or 0
border-image none
border-radius 0
box-shadow none
clear none
color "No value, so best option is to use inherit to cascade from a parent element’s color value."
content normal
display inline
float none
font normal
height auto
letter-spacing normal
line-height normal
max-width none
max-height none
min-width 0
min-height 0
opacity 1
overflow visible
page-break-inside auto
position static (not relative)
text-shadow none
text-transform none
transform none
transition none
vertical-align baseline
visibility visible
white-space normal
width auto
word-spacing normal
z-index auto (not none or 0)

Source

Hot Links

Per-repository SSH keys

If you want to use different keys depending on the repository you are working on, you can issue the following command while inside your repository:

git config core.sshCommand "ssh -o IdentitiesOnly=yes -i ~/.ssh/private-key-filename-for-this-repository -F /dev/null"

This will not use the SSH Agent and requires at least Git 2.10.

Source

Kill Chrome Command

killall -9 "Google Chrome"

Lofty Concepts

Code Playgrounds

Cheat Sheets

Axios catch error

Disable eslint for a file

/* eslint-disable */

Find files with an extention in dir

find ./components -type f -name '*.stories.tsx'

Set a stage status in Jenkins Pipelines

pipeline {
    agent any
    stages {
        stage('1') {
            steps {
                sh 'exit 0'
            }
        }
        stage('2') {
            steps {
                catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') {
                    sh "exit 1"
                }
            }
        }
        stage('3') {
            steps {
                sh 'exit 0'
            }
        }
    }
}

Misc links

Concepts

Redux

Testing

About