Skip to content

Instantly share code, notes, and snippets.

View coryrylan's full-sized avatar

Cory Rylan coryrylan

View GitHub Profile
{
  type: 'teacher'
  id: number
  firstName: string
  lastName: string
}

{
 type: 'student'
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { VideoDataService } from './video-data.service';
@NgModule({
imports: [CommonModule]
})
export class CoreModule {
static forRoot(): ModuleWithProviders {
@coryrylan
coryrylan / deep-copy.ts
Created April 26, 2017 16:06
Deep copy
export function deepClone<T>(obj: T): T {
let copy;
if (null === obj || 'object' !== typeof obj) {
return obj;
}
if (obj instanceof Date) {
copy = new Date();
copy.setTime(obj.getTime());
// Example
// <input ngControl="title" />
// <show-error control="title"></show-error>
import {Component, Inject, Host, NgFormModel} from 'angular2/angular2';
import {ValidatorsService} from './services/validation/validators.service';
@Component({
selector: 'show-error',
properties: ['controlPath: control'],

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

Website Contract [month] [year]

Description of this Contract

This contract is not meant to trick or deceive you; the intention is purely to protect both parties. I have tried to keep the wording as plain as possible, but if anything is unclear, please let me know and I will be more than happy to clarify it with you. Also, until you sign it, please feel free to request to change bits of it to suit your requirements.

In short, [client name] is contracting me, [my name], to [description of my role] between [start date and finish date].

By signing this, you are confirming that you have the power and ability to enter into this contract on behalf of [client's company].