Skip to content

Instantly share code, notes, and snippets.

View BerkeleyTrue's full-sized avatar
💭
Baby Yoda is my spirit animal

Berkeley Martinez BerkeleyTrue

💭
Baby Yoda is my spirit animal
View GitHub Profile

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
@BerkeleyTrue
BerkeleyTrue / Thundercats and es5.md
Last active August 29, 2015 14:22
Thundercats es5 class creation

Thundercats and es5

@BerkeleyTrue
BerkeleyTrue / A-ProfetchRX-README.MD
Last active August 29, 2015 14:22
Reactive Fetcher anyone?

ProFetchRx

A Universal(read: isomorphic) JavaScript library for fetching data from remote datasources.

This describes what the api would look like for a fetcher based on RxJs.

All times EST. Add your initials next to any slot you can take (preferably 2 - 4 hour consecutive slots), and in a few words what you plan to stream.
NOTE(berkeley) fork to edit just like a repo. Then ask Quincy to merge in changes
Thursday:
17:00 -
18:00 -
19:00 -
20:00 -
21:00 -
@BerkeleyTrue
BerkeleyTrue / rebase-merge.sh
Created October 9, 2015 07:58 — forked from jeffbcross/rebase-merge.sh
How angular merges PRs
#See fetch_pr script https://gist.github.com/vojtajina/5538170
# fetch and checkout PR branch from "upstream" remote
fetch_pr 123
git fetch upstream
# Replay changes on top of master
git rebase upstream/master
# Replace upstream/master with this branch
git push upstream pr-123:master
/* eslint-disable no-process-exit */
require('dotenv').load();
var secrets = require('./config/secrets'),
mongodb = require('mongodb'),
Rx = require('rx'),
Observable = Rx.Observable,
MongoClient = mongodb.MongoClient;
const points = [
{username: 'abhisekp', points: 200 },

SHPE Meeting of the minds

January 16, 2016

Start time: 11:21AM

End time:

What do you expect out of this retreat?

Reynolds

function completedChallenge(req, res, next) {
// build user update data, no longer mutates user object
const { updateData, alreadyCompleted, points } = buildUpdateData(req);
// calls an update data using user instance id and sends only updateData
return user.update$(updateData)
.subscribe(
count => log('%s documents updated', count),
next,
function() {
return res.json({
function completedChallenge(req, res, next) {
const { user, body } = req;
// mutates user object
const { alreadyCompleted } = updateUserProgress(user, body);
/ sends entire user object to database
return saveUser(req.user)
.subscribe(
() => {},
next,
function() {