This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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 | |
*/ |