Skip to content

Instantly share code, notes, and snippets.

View johnlindquist's full-sized avatar
💭
Eating a taco 🌮

John Lindquist johnlindquist

💭
Eating a taco 🌮
View GitHub Profile
@johnlindquist
johnlindquist / gist:3c63347a1b5e9d5919c4
Last active August 29, 2015 14:07
ngEurope workshop info
https://dl.dropboxusercontent.com/u/132579/egghead-board-game-store-server-only.zip
1. npm install
2. "node server.js"
If that doesn't work, try:
http://games-johnlindquist.rhcloud.com/hello
http://games-johnlindquist.rhcloud.com/game
/// <reference path="typings/angular2/angular2.d.ts" />
if (typeof __decorate !== "function") __decorate = function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
}
};
if (typeof __metadata !== "function") __metadata = function (k, v) {
@johnlindquist
johnlindquist / gist:3186d354f785e988305c
Created May 13, 2015 20:54
A2Component.es6.sublime-snippet
<snippet>
<content><![CDATA[
@Component({
selector: "${2:${1/^(\w)|([A-Z])/(?1\l\1)(?2-\l\2)/g}}"
})
@View({
templateUrl: "${2}.html"
})
class ${1:MyAmazingComponent}{}
]]></content>
@johnlindquist
johnlindquist / gist:252f29e087219be7e11a
Created May 14, 2015 16:54
A2 es5 Sublime Snippets
<snippet>
<content><![CDATA[
function ${1:MyAmazingComponent}(){}
${1:MyAmazingComponent}.annotations = [
new angular.ComponentAnnotation({
selector: "${2:${1/^(\w)|([A-Z])/(?1\l\1)(?2-\l\2)/g}}"
}),
new angular.ViewAnnotation({
templateUrl: "${2}.html"
})
<!DOCTYPE html>
<html lang="en" ng-app="workshop">
<head>
<meta charset="UTF-8">
<title>AngularJSJumpstart</title>
<link rel="stylesheet" href="bootstrap.min.css">
<script src="angular.js"></script>
<script src="workshop.js"></script>
</head>
<body ng-controller="BodyController as body">
<!doctype html>
<html lang="en" ng-app="workshop">
<head>
<meta charset="UTF-8">
<title>AngularJS Jumpstart</title>
<link rel="stylesheet" href="bootstrap.min.css"/>
<script src="angular.js"></script>
<script src="workshop.js"></script>
</head>
<!doctype html>
<html lang="en" ng-app="workshop">
<head>
<meta charset="UTF-8">
<title>AngularJS Jumpstart</title>
<link rel="stylesheet" href="bootstrap.min.css"/>
<script src="angular.js"></script>
<script src="workshop.js"></script>
</head>
<!doctype html>
<html lang="en" ng-app="workshop">
<head>
<meta charset="UTF-8">
<title>AngularJS Jumpstart</title>
<link rel="stylesheet" href="bootstrap.min.css"/>
<script src="angular.js"></script>
<script src="workshop.js"></script>
<script src="people.js"></script>
<!doctype html>
<html lang="en" ng-app="workshop">
<head>
<meta charset="UTF-8">
<title>AngularJS Jumpstart</title>
<link rel="stylesheet" href="bootstrap.min.css"/>
<script src="angular.js"></script>
<script src="workshop.js"></script>
<script src="food.js"></script>
angular.module("food", [])
.service("foodService", function($http){
var foodService = this;
foodService.requestMenu = function(){
//Don't eat people. People are friends, not food!
return $http.get("people.json").then(function(result){
return result.data.results;
})
}