Skip to content

Instantly share code, notes, and snippets.

View SampsonCrowley's full-sized avatar
💭
Building intelligent applications for EMR systems

Sampson Crowley SampsonCrowley

💭
Building intelligent applications for EMR systems
View GitHub Profile
/*
* This snippet is a global header service to set SEO meta tags with Angular 2
*/
import { Injectable } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { getDOM } from '@angular/platform-browser/src/dom/dom_adapter';
@Injectable()
##
# The following is a snippet from the ruby CLI documentor gem Documentize. The goal of the gem
# is to parse an existing ruby file, pretty print it with two space indents and add a preconfigured
# TomDoc.
#
# The build_code function below is the recursive function in the builder class that rebuilds the broken down code
# for printing back to the screen
#
# This section of the module utilizes the "class << self" syntax to allow instance variables for class methods
# and private class functions
@SampsonCrowley
SampsonCrowley / asteroids.bullet.js
Created April 7, 2017 16:54
Asteroids Bullet Model
/*
* Below is a section of code for creating and moving bullets in a canvas rendered asteroids game.
*
* Since asteroid ships can be facing a different direction than their movement direction, I needed
* to implement this model in a way that guaranteed bullets always fire in the direction the ship is facing.
*
* Multiple objects in the game are moveable, so code is simplified through Constructor inheritance.
*
* All functions are named for easier debugging
*/