Skip to content

Instantly share code, notes, and snippets.

View yoshuawuyts's full-sized avatar

Yosh yoshuawuyts

View GitHub Profile
const sequence = require('run-sequence')
// create a middleware stack
// (obj, obj, [fn(obj, obj, fn)], fn) -> null
function mw (req, res, arr, done) {
const fns = arr.map(fn => (next) => fn(req, res, next))
sequence(fns, done)
}
@yoshuawuyts
yoshuawuyts / error.md
Created February 17, 2014 16:32
edititem linkButton.clickHandler: Cannot call method 'preventDefault' of undefined react-0.8.0-min.js:7276 Uncaught TypeError: Cannot call method 'preventDefault' of undefined linkComponent.js:7
edititem linkButton.clickHandler: Cannot call method 'preventDefault' of undefined react-0.8.0-min.js:7276
Uncaught TypeError: Cannot call method 'preventDefault' of undefined linkComponent.js:7

lint

eslint
csslint

unit

mocha
should

Proposal hangman

Goals

The goal is to build a working version of the classic game 'hangman'. A user should keep inputting letters until he/she has guessed the word.

Definition of Done

The implementation is considered complete when:

  • the computer selects a random word from a dictionary
  • the user can input letters to incrementally guess the word
  • the user receives feedback on his input

Social Animal

Preparations

  • Prepare handouts
  • Setup clicker
  • Speaker notes
  • Organize breakpoints
'use strict';
/**
* Exports
*/
exports = module.exports = container;
/**
* Function chaining example
# This is a title

- this is a list
- this is a list

[this is a link](link.com)
![I'm an image](link.com)

// this is a comment
@yoshuawuyts
yoshuawuyts / nodeTree.md
Created May 3, 2014 09:01
zsh tree command for node.js
alias t='tree -a -L 2 -C -I "node_modules|.git"'
  • Log all files
  • Log 2 levels of indentation
  • Use colors
  • Don't log node_modules and .git

The social animal

This is a search query delimiter to solely find articles in the permitted journals.

Assignment

  • The paper will need to be a study of literature, based on at least 5 social psychological articles, which have appeared in peer-reviewed, international journals, at least 4 of these published after 1995.
  • In addition, you are free to include references to your text book, or empirical book chapters.
  • Your paper needs to be between 2000 and 2500 words, including abstract, title page, and reference list.

CSS stuff

From @heydonworks

I did flex for layout, vw for fonts and ems for padding / margin. Everything scales proportionately to v small sizes.

Method

  • flexbox for element layout
  • vw for fonts
  • ems for margin / padding