Skip to content

Instantly share code, notes, and snippets.

View pertrai1's full-sized avatar
🏠
Working from home

Rob Simpson pertrai1

🏠
Working from home
  • Warrenton, VA
View GitHub Profile
@pertrai1
pertrai1 / example01.js
Created April 25, 2018 09:02 — forked from mpj/example01.js
Code for the async/await episode of Fun Fun Function.
const response = await fetch(`https://catappapi.herokuapp.com/users/${userId}`)
const data = await response.json()
return data.imageUrl
}
@pertrai1
pertrai1 / tsconfig.json
Created March 17, 2018 11:50
TS Config BP
{
"compilerOptions": {
"target": "es2017",
"outDir": "build/main",
"rootDir": "src",
"moduleResolution": "node",
"module": "commonjs",
"declaration": true,
"inlineSourceMap": true,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
@pertrai1
pertrai1 / floats.css
Created October 3, 2017 15:34
FE Masters Float Example
/* Border box declaration
https://www.paulirish.com/2012/box-sizing-border-box-ftw/ */
html {
box-sizing: border-box;
}
/* inherit border-box on all elements in the universe and before and after
*/
*,
*:before,
*:after {
@pertrai1
pertrai1 / .vimrc
Created May 29, 2017 13:47
Latest Vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-git'
@pertrai1
pertrai1 / man-output
Created January 21, 2017 03:31
Send man pages to Preview
man -t grep | open -f -a Preview
@pertrai1
pertrai1 / derived.js
Last active January 15, 2017 21:31
JavaScript class from C++
/**
This is the C++ example
#include <iostream>
using namespace std;
class Base
{
public:
int m_id;
@pertrai1
pertrai1 / .vimrc-new
Created December 8, 2016 08:45
vimrc generated
"*****************************************************************************
"" Vim-PLug core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
endif
let vimplug_exists=expand('~/.vim/autoload/plug.vim')
let g:vim_bootstrap_langs = "c,html,javascript"
@pertrai1
pertrai1 / .vimrc.local
Created December 8, 2016 08:44
.vimrc.local
nnoremap ; :
nnoremap <silent><BS> :nohlsearch<CR>
set list lcs=trail:·,tab:»·
"bind K to grep word under cursor
nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR>
augroup refreshVimrc
autocmd!
@pertrai1
pertrai1 / ctags
Created December 7, 2016 08:25
JavaScript CTags
--sort=yes
--tag-relative
--recurse
--exclude=node_modules
--exclude=coverage
--exclude=vendor
--exclude=bower_components
--langdef=js
--langmap=js:.js
@pertrai1
pertrai1 / alias.txt
Last active May 22, 2020 18:31
Aliases
-='cd -'
...=../..
....=../../..
.....=../../../..
......=../../../../..
1='cd -'
2='cd -2'
3='cd -3'
4='cd -4'
5='cd -5'