Skip to content

Instantly share code, notes, and snippets.

Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
IT'S SHOWTIME
HEY CHRISTMAS TREE isLessThan100
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE n
YOU SET US UP 0
HEY CHRISTMAS TREE multiple
YOU SET US UP @NO PROBLEMO
STICK AROUND isLessThan100
@jeremyfelt
jeremyfelt / open-source-search-compare.md
Last active July 19, 2023 01:28
Comparing open source search solutions
@geoffgarside
geoffgarside / gist:25221
Created November 15, 2008 09:25
Scripts to setup ZFS on a FreeBSD server
#!/bin/sh
# Creates all our file systems
zpool create tank /dev/ad1s1d
zfs create tank/root
zfs create tank/usr
zfs create tank/var
zfs create tank/tmp
zfs set mountpoint=/tank tank/root
zfs set mountpoint=/tank/usr tank/usr