Skip to content

Instantly share code, notes, and snippets.

View vnys's full-sized avatar

Victor Nystad vnys

View GitHub Profile
@vnys
vnys / .babelrc
Last active November 22, 2018 08:30
React and Parcel simplest setup possible
{
"presets": [
"@babel/preset-react"
]
}
@vnys
vnys / klus-mgp.md
Last active December 3, 2018 13:49
KLUS MGP
  • Evalueringsskjema
  • Google Drive
@vnys
vnys / vscode-markdown-preview-styles.css
Last active February 16, 2019 08:42
vscode markdown preview styles
body {
color: orange !important;
}
* {
color: pink !important;
}
@vnys
vnys / git-checkout-pr.md
Last active June 4, 2019 06:19
check out pr
$ git fetch origin pull/123/head:pr-123

$ git checkout pr-123

@vnys
vnys / nuke-mock-data-with-bgf.md
Last active June 4, 2019 09:41
nuke mock-data with bfg

Nuking mock-data folder from git repo

Assuming: Mac, no java sdk installed, homebrew installed

$ brew cask install adoptopenjdk
$ brew install bfg
$ cd my-git-repo
$ bfg --delete-folders mock-data --no-blob-protection ./
$ git reflog expire --expire=now --all

$ git gc --prune=now --aggressive

How to: Equinor private NPM registry

Disclamer: This is just an example on how to do these tasks. You can configure npm/yarn in many ways to make life easier.
Feel free to experiment.

Login

CLI

Requirements: Have a Github account that is a member of the Github organization Equinor

  1. Create a personal access token on Github with the read:org scope
  2. Run npm login --registry https://npm.equinor.com
@vnys
vnys / README.md
Created September 12, 2019 06:06 — forked from hofmannsven/README.md
Increase key repeat rate on macOS

Increase key repeat rate on macOS

Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat

Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.

Source: https://apple.stackexchange.com/a/83923

@vnys
vnys / ..git-pr.md
Created November 8, 2019 10:25 — forked from gnarf/..git-pr.md
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out