Skip to content

Instantly share code, notes, and snippets.

View adharris's full-sized avatar

Aubrey Harris adharris

  • athenahealth
  • Somerville, MA
View GitHub Profile
@adharris
adharris / app.module.ts
Created September 16, 2016 16:40
uiRouter.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { UIRouterModule } from 'app/uiRouter';
import { ProgramModule } from 'app/programs';
import { ParticipantModule } from 'app/participants';
@adharris
adharris / app.module.ts
Created August 12, 2016 17:44
UIRouter with NgModules
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { UIRouterModule } from './uirouter.module';
import { MyRouterConfig } from './uirouter.config';
@NgModule({
declarations: [],
imports: [
import {Injectable} from '@angular/core';
import {Transition, TransitionService, HookMatchCriteria, RawParams,TransitionHookFn} from 'ui-router-ng2';
import {Observable, ReplaySubject} from 'rxjs';
@Injectable()
export class ParamStream {
constructor(private transitionService: TransitionService) {}
@adharris
adharris / gist:23f1fc4617e6864f30e6
Created November 10, 2014 15:18
SQLAlchemy Continuum manual revisions
from itertools import chain
from sqlalchemy_continuum import (
VersioningManager, Operation, UnitOfWork,
make_versioned)
from sqlalchemy_continuum.utils import(
is_versioned, versioned_objects, option, is_modified)
from sqlalchemy.orm import object_session
@adharris
adharris / .gitignore
Last active December 22, 2015 18:49
Simple Flask app using Drupal Bakery for authentication
venv
templates
*.pyc
@adharris
adharris / postgres_array.go
Created November 28, 2012 19:52
PostgreSQL demo of Array types using Golang
package main
import (
"database/sql"
"errors"
"fmt"
_ "github.com/bmizerany/pq"
"os"
"regexp"
"strings"