Skip to content

Instantly share code, notes, and snippets.

View DennyScott's full-sized avatar

Denny Scott DennyScott

  • Winnipeg, Manitoba
View GitHub Profile
@DennyScott
DennyScott / vimrc
Last active August 29, 2015 14:00
vimrc
set nocompatible " be iMproved, required
filetype off "required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
"let Vundle manage Vundle, required
#SERVER CONNECTIONS
alias sail-cti='ssh root@104.131.250.11q'
alias bbiq='ssh root@104.131.200.108'
#RC FILES
alias bashrc='vim ~/.bash_profile'
alias vimrc='vim ~/.vimrc'
alias vim='mvim'
function getWatchers(root) {
root = angular.element(root || document.documentElement);
var watcherCount = 0;
function getElemWatchers(element) {
var isolateWatchers = getWatchersFromScope(element.data().$isolateScope);
var scopeWatchers = getWatchersFromScope(element.data().$scope);
var watchers = scopeWatchers.concat(isolateWatchers);
angular.forEach(element.children(), function (childElement) {
watchers = watchers.concat(getElemWatchers(angular.element(childElement)));
call plug#begin('~/.vim/plugged')
" Group dependencies, vim-snippets depends on ultisnips
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
Plug 'bling/vim-airline'
Plug 'facebook/vim-flow'
Plug 'sjl/vitality.vim'
Plug 'pangloss/vim-javascript'
Plug 'terryma/vim-multiple-cursors'
Plug 'kien/ctrlp.vim'
@DennyScott
DennyScott / .zshrc
Created December 4, 2015 22:04
Zshrc Config
# Path to your oh-my-zsh installation.
export ZSH=/Users/dennyscott/.oh-my-zsh
export PHANTOMJS_BIN=/usr/local/Cellar/nvm/0.26.0/versions/node/v4.2.1/lib/node_modules/phantomjs
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
@DennyScott
DennyScott / NewMacInstall.txt
Last active December 6, 2015 20:22
New Mac
Install Chrome: https://www.google.com/chrome/browser/desktop/index.html
Install Slack, Xcode: App Store <--Do this quick, need it later
Install Unity: https://unity3d.com/get-unity/download?ref=personal
Install Android Studio: http://developer.android.com/tools/studio/index.html
Install Source Tree: https://www.sourcetreeapp.com/
Install Brew : ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Iterm 2 : https://www.iterm2.com/
Install TMux: brew install tmux
Install Pip: sudo easy_install pip
Install Neovim: brew install neovim/neovim/neovim
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="googlechrome" />
<package id="nodejs.install" />
<package id="git.install" />
<package id="javaruntime" />
<package id="conemu" />
<package id="jdk8" />
<package id="sourcetree" />
<package id="sourcetree" />
const personOne = {
firstName: “Denny”,
lastName: “Scott”,
contact: {
phoneNumber: 555–555–5555,
twitter: “
@gitinbit”
}
}
function getUserForPhoneDirectory(person) {
function getUserForPhoneDirectory(person) {
const firstName = person?.firstName;
const lastName = person?.lastName;
const phoneNumber = person?.contact?.phoneNumber;
if(firstName && lastName && phoneNumber) {
return `${firstName} ${lastName} - ${phoneNumber}`
}
}
mkdir optional-chaining-demo
cd optional-chaining-demo
npm init