Skip to content

Instantly share code, notes, and snippets.

View vnys's full-sized avatar

Victor Nystad vnys

View GitHub Profile
@vnys
vnys / mongo-autostart-osx.md
Created June 10, 2016 10:00 — forked from subfuzion/mongo-autostart-osx.md
mongo auto start on OS X

Install with Homebrew

brew install mongodb

Set up launchctl to auto start mongod

$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

/usr/local/opt/mongodb/ is a symlink to /usr/local/Cellar/mongodb/x.y.z (e.g., 2.4.9)

@vnys
vnys / mdless.md
Last active July 12, 2016 08:05
colour-coded markdown-files in the terminal

Last ned get-pip.py

Kjør følgende (med sudo om nødvendig)

$ gem install mdless
$ python python get-pip.py
$ pip install Pygments
$ mdless README.md
@vnys
vnys / automatic-uid.md
Created July 24, 2016 10:56
Prismic bugs

adfasf

@vnys
vnys / fish-path.md
Last active June 14, 2017 09:44
Fish function for cloning from a Github repo. Usage: gc batfink/foo or gc batfink/foo bar (clones foo into bar)

set -U fish_user_paths /usr/local/bin $fish_user_paths

@vnys
vnys / browserslist
Created December 21, 2016 08:00
Config for autoprefixer, legges i roten av prosjektet
# Amedia Utvikling
last 1 chrome versions
last 1 ff versions
last 1 edge versions
safari 7-10
ios_saf 7-10
chrome 38
chrome 34
ie 11
@vnys
vnys / vim_regex.md
Created February 27, 2017 09:06
Regex

Slett id

'<,'>s/\v id="[a-z-]*"//g

  • 100% — FF
  • 95% — F2
  • 90% — E6
  • 85% — D9
  • 80% — CC
  • 75% — BF
  • 70% — B3
  • 65% — A6
  • 60% — 99
  • 55% — 8C
@vnys
vnys / gist:24232ce8a787f196a5bf582d8fafe87c
Created April 24, 2017 13:10 — forked from zhannes/gist:3207394
Git rebase workflow
# first, fetch the latest refs for all branches. And be sure we have latest master, etc
git checkout master
git fetch
# If any changes from remote, catch our local version up
git rebase origin/master
# could also be done as
@vnys
vnys / *.md
Created May 10, 2017 07:46
Component versus Directive in AngularJS

Component versus Directive in AngularJS

.component()

Components are not "helper" methods, they are the best change in Angular 1.x since I've been using it.

What is the role of .component()?

  • Declares new HTML via a template or templateUrl
  • Should be used to create Components as part of a Component architecture