Skip to content

Instantly share code, notes, and snippets.

View w3cj's full-sized avatar
🌱

CJ w3cj

🌱
View GitHub Profile
class Array {
constructor() {
this.length = 0;
}
push(value) {
this[this.length] = value;
this.length++;
}
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "homebrew/services"
brew "bash"
brew "cowsay"
brew "fortune"
brew "git"
brew "mongodb"
brew "postgresql"

Dev Setup

  1. Homebrew/terminal/bash
  2. OSX Productivity - Window Management/Quick Launcher/Hyperswitch
  3. OSX Settings - Dock/Finder
  4. Web Browser - Extensions - AdBlock, Privacy Badger, OneTab, JSONViewer, Stylus, Vue Devtools, React Devtools
  5. Node.js - nvm
  6. Code Editor - vs code
  7. Code Editor Extensions
  8. Break timer and Flux
patbenatar.advanced-new-file
formulahendry.auto-close-tag
formulahendry.auto-rename-tag
fosshaas.fontsize-shortcuts
BriteSnow.vscode-toggle-quotes
Zignd.html-css-class-completion
christian-kohler.npm-intellisense
christian-kohler.path-intellisense
octref.vetur
dbaeumer.vscode-eslint
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew cask install iterm2
# update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts
brew install bash # latest version of bash
# set brew bash as default shell
brew install fortune
brew install cowsay
brew install git
const express = require('express');
const morgan = require('morgan');
const cors = require('cors');
const app = express();
app.use(morgan('dev'));
app.use(cors());
app.get('/', (req, res) => {
@w3cj
w3cj / spa-notes.md
Last active October 16, 2018 10:34
  • What does MVC stand for? What is MVC?
    • Model, View, Controller
    • Pattern - Design Pattern
    • A way to present information to a user
    • A way to seperate an application
      • Separates an application into 3 parts
      • Allow different information to be accessed by different
    • Controller manipulates Model
    • View - view and input - user interaction
app.get('/search/:location/:job', (request, response) => {
const { location, job } = request.params;
const cl = `https://${location}.craigslist.org/search/jjj?query=${job}`;
const reddit = `https://www.reddit.com/r/jobbit/search.json?q=${job}&restrict_sr=1`;
Promise.all([
fetch(cl)
.then(response => response.text()),
fetch(reddit)
<template>
<div class="container">
<div v-if="alertMessage" class="alert alert-secondary invisible" role="alert">{{alertMessage}}</div>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Example Chat</div>
<div class="panel-body">
<ul>
process.on('uncaughtException', (error) => {
console.log('Uncaught Exception:', error);
});
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at:', p, 'reason:', reason);
});