Skip to content

Instantly share code, notes, and snippets.

View packages.txt
There are many versions of express
== express@^4.16.2
= github.com/FullstackAcademy/Solution.Wikistack1#master
= github.com/FullstackAcademy/PairExercise.Wizard-news-pt2#master
= github.com/FullstackAcademy/PairExercise.Wizard-news-pt1#master
= github.com/FullstackAcademy/PairExercise.Wizard-news-pt3#master
= github.com/FullstackAcademy/Solution.Wikistack2#master
= github.com/FullstackAcademy/PairExercise.ContactList#master
= github.com/FullstackAcademy/PairExercise.ContactList.Solution#master
= github.com/FullstackAcademy/PairProject.Juke#master
View smart-actions.js
class Increment {
constructor (by) {
this.by = by
}
getNextState (count) {
return count + this.by
}
}
View bootloader.js
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider as ReduxProvider } from 'react-redux';
import AppContainer from './app-container';
import createActionRegistry from './store/actions'
import createThunkRegistry from './store/thunks'
import history from './store/history'
View server.js
const express = require('express')
const morgan = require('morgan')
const Chance = require('chance')
const app = express()
app.use(morgan('dev'))
const chance = new Chance()
Chance.prototype['3d6'] = function () {
View killer.js
var foo = {
bar: function () {
console.log(`There are ${this.many} lights!`);
}
}
foo.bar();
View pseudo-mocha.js
const registeredTests = [];
function it (testFn) {
registeredTests.push(testFn);
}
function runTheNextTest () {
var testFunction = registeredTests.pop();
var isAsync = testFunction.length == 1;
@collin
collin / 1-vimsetup.md
Last active Aug 4, 2017
Collin's vim setup
View 1-vimsetup.md

I use neovim, which is mostly compatible with all vim plugins and apis.

vim-pathogen loads my plugins

I use a few plugins to give me a better editing/navigation experience.

  • ctrlp.vim fuzzy-search to find files in the project by name
  • nerdtree file tree navigator
  • syntastic syntax highlighting and linting
  • vim-better-whitespace cleans up whitespace as I save files
View Dockerfile
FROM alpine:3.5
ENV SBT_VERSION 0.13.11
ENV SBT_HOME /usr/local/sbt
ENV PATH ${PATH}:${SBT_HOME}/bin
RUN apk add --no-cache openjdk7 curl
RUN curl -sL "http://dl.bintray.com/sbt/native-packages/sbt/$SBT_VERSION/sbt-$SBT_VERSION.tgz" | gunzip | tar -x -C /usr/local && \
echo -ne "- with sbt $SBT_VERSION\n" >> /root/.built
View cool.css
.my-cool-styles {
background-color: blue;
}
@collin
collin / www.html
Created Nov 21, 2016
This is the homepage with new markup
View www.html
<!DOCTYPE html>
<html lang="en">
<head>
<!--
:::,
:::, ,::
:::: ::::
:::::::::
::::::::