Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Building intelligent applications for EMR systems

Sampson Crowley SampsonCrowley

💭
Building intelligent applications for EMR systems
View GitHub Profile
View seo.service.ts
/*
* 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()
View ruby_builder.rb
##
# 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
View asteroids.bullet.js
/*
* 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
*/