Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Harris adharris

  • athenahealth
  • Somerville, MA
View GitHub Profile
@adharris
adharris / app.module.ts
Created Sep 16, 2016
uiRouter.module.ts
View app.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 Aug 12, 2016
UIRouter with NgModules
View app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { UIRouterModule } from './uirouter.module';
import { MyRouterConfig } from './uirouter.config';
@NgModule({
declarations: [],
imports: [
View ParamStream.ts
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 Nov 10, 2014
SQLAlchemy Continuum manual revisions
View gist:23f1fc4617e6864f30e6
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 Dec 22, 2015
Simple Flask app using Drupal Bakery for authentication
View .gitignore
venv
templates
*.pyc
@adharris
adharris / postgres_array.go
Created Nov 28, 2012
PostgreSQL demo of Array types using Golang
View postgres_array.go
package main
import (
"database/sql"
"errors"
"fmt"
_ "github.com/bmizerany/pq"
"os"
"regexp"
"strings"
You can’t perform that action at this time.