Skip to content

Instantly share code, notes, and snippets.

View systemnate's full-sized avatar

Nate Dalo systemnate

View GitHub Profile
set nocompatible
filetype off
set background=light
colorscheme solarized
runtime macros/matchit.vim
let mapleader= " "
set tabstop=2
set shiftwidth=2
set shiftround
@systemnate
systemnate / VueTesting.md
Last active August 8, 2017 14:19
Single File Component Testing with Vue and Rails (Karma, Jasmine, Avoriaz)

Unit Testing

This wiki will demonstrate how to setup and test Vue components. I am assuming that Vue is already setup in the project using the webpacker gem.

This guide will use Karma, Jasmine, and Avoriaz for testing.

Karma - A test runner for unit tests.

Karma is essentially a tool which spawns a web server that executes source code against test code for each of the browsers connected. The results of each test against each browser are examined and displayed via the command line to the developer such that they can see which browsers and tests passed or failed.

Jasmine - A testing framework.

@systemnate
systemnate / gist:34b731050063e8d9ffd5
Last active January 7, 2016 17:01
Learning Vim - Some useful combos I have discovered

Learning Vim - Some Helpful Commands

A lot of these come from the great book "Practical Vim".

  • daw - Delete a Word
  • <C -a> (Control + A) - If you have the cursor over the number, it will increment it. Otherwise, it will increment the first number on the line
  • <C -x> - Same as above, but decrement.
  • yyp - yank text and paste it below current line
  • yyP - yank text and paste it above current line
  • cw - change word...deletes word and places you in insert mode
@systemnate
systemnate / rubytoolbox.txt
Created January 5, 2016 19:01
Ruby Toolbox
Ruby Version Manager
rvm list # - View available ruby versions
rvm use 2.3.0 # - Use version 2.3.0 (if installed)
rvm install 2.3.0 # - Install version 2.3.0 (if not installed)
-----------------
String methods
-----------------
"hello".capitalize # => "Hello"
"nxte dxlo".gsub('x','a') # => "nate dalo"
"a".succ # => "b"