Skip to content

Instantly share code, notes, and snippets.

View andrewconnell's full-sized avatar
📺
Building courses for @Voitanos

Andrew Connell andrewconnell

📺
Building courses for @Voitanos
View GitHub Profile
@andrewconnell
andrewconnell / OfficeUIFabric-PrimaryThemeSwatch.html
Created September 18, 2015 14:20
OfficeUIFabric-PrimaryThemeSwatch
<div style="border:1px gray solid; padding:10px; width:75%">
<div class="ms-fontColor-themePrimary">ms-fontColor-themePrimary</div>
<div class="ms-bgColor-themePrimary ms-fontColor-white"
style="width:90%; margin-top:5px; padding:10px;">ms-bgColor-themePrimary</div>
<div class="ms-borderColor-themePrimary ms-fontColor-themePrimary"
style="border-width:1px; border-style:solid; width:90%; margin-top:5px; padding:10px;">
ms-borderColor-themePrimary</div>
</div>
@andrewconnell
andrewconnell / Gulpfile.ts
Last active October 31, 2015 12:48
Dynamically loading gulp tasks with TypeScript
'use strict';
import * as fs from 'fs';
let gulp: any = require('gulp-help')(require('gulp'));
let gulpTaskPath: string = './build/gulp/tasks';
// refer to the following file for referenced interfaces
// https://github.com/andrewconnell/blog-gulpts-dynaload/blob/master/build/gulp/gulp.d.ts
// load all gulp tasks (located in ./build/gulp/tasks)
@andrewconnell
andrewconnell / BaseGulpTask.ts
Created October 31, 2015 12:50
Abstract base class for a gulp task with defaults set
'use strict';
/** @class */
export class BaseGulpTask {
/**
* @property {string} description - Help description for the task.
*/
public static description: string = '';
@andrewconnell
andrewconnell / build-ts.ts
Last active October 31, 2015 13:27
Example gulp task... this compiles all TypeScript to JavaScript in a project
'use strict';
import {BaseGulpTask} from '../BaseGulpTask';
import * as gulp from 'gulp';
import {Utils} from '../utils';
import * as yargs from 'yargs';
let $: any = require('gulp-load-plugins')({ lazy: true });
/**
* Builds all TypeScript as JavaScript as the gulp task 'build-ts'.

NOTE: since originally posting this, I have setup appveyor and dramatically simplfiied our process. for backreference, i branched the repo with the old scripted setup here: https://github.com/ngOfficeUIFabric/nuget-ngofficeuifabric/tree/scripted-deploy. Links below have been updated to point to that branch. master now contains the appveyor build out

full repo: https://github.com/ngOfficeUIFabric/nuget-ngofficeuifabric

goal of this library is to hold contents for a NuGet package, then using CI (travisci / circleci) have it run two gulp tasks to create the nuget package & submit via HTTP PUT to NuGet.org, updating this nuget package: https://www.nuget.org/packages/ng-office-ui-fabric/

external dependencies:

@andrewconnell
andrewconnell / build.ts
Created August 10, 2016 17:09
Gulp Task for Building Project & Application TypeScript Code
import * as gulp from 'gulp';
import * as yargs from 'yargs';
import * as merge from 'merge2';
import { BaseGulpTask } from '../BaseGulpTask';
import { BuildConfig, ProjectArtifact, ProjectPaths, Utils } from '../buildBarrel';
import { gulpIf, gulpPlumber, gulpPrint, gulpSourcemaps, gulpTypeScript } from '../gulpPlugins';
/**
* Builds the project, then the application.
*
@andrewconnell
andrewconnell / gulpPlugins.ts
Created August 10, 2016 17:20
Gulp Plugins barrel
let gulpConvChangeLog: any = require('gulp-conventional-changelog');
import * as gulpPlumber from 'gulp-plumber';
let gulpPrint: any = require('gulp-print');
import * as gulpIf from 'gulp-if';
import * as gulpIstanbul from 'gulp-istanbul';
import * as gulpMocha from 'gulp-mocha';
let gulpRimraf: any = require('gulp-rimraf');
import * as gulpTslint from 'gulp-tslint';
import * as gulpTypeScript from 'gulp-typescript';
import * as gulpSourcemaps from 'gulp-sourcemaps';
FROM node:5.11.1
RUN mkdir -p /home/nodejs && \
groupadd -r nodejs && \
useradd -r -g nodejs -d /home/nodejs -s /sbin/nologin nodejs && \
chown -R nodejs:nodejs /home/nodejs && \
mkdir -p /voyager/app && \
chown -R nodejs:nodejs /voyager/app && \
npm install -g nodemon
@andrewconnell
andrewconnell / ratekeeper.proto
Created September 11, 2016 11:03
RateKeeper Protobuf definition file
syntax = "proto3";
package ratekeeper;
service RateKeeperService {
rpc GetMeter(GetMeterRequest) returns (GetMeterResponse) {}
rpc AddMeter(AddMeterRequest) returns (AddMeterResponse) {}
}
/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
@andrewconnell
andrewconnell / RateKeeperService.ts
Last active September 11, 2016 11:05
TypeScript representation of the RateKeeper protobuf & gRPC client
import { IPublicCloudMeter, IPublicCloudMeterPrice } from './';
export interface IRateKeeperServer {
addMeter: (call: IRateKeeperAddMeterCall, callback: RateKeeperAddMeterCallback) => void;
getMeter: (call: IRateKeeperGetMeterCall, callback: RateKeeperGetMeterCallback) => void;
}
export interface IRateKeeperClient {
addMeter(request: IRateKeeperAddMeterRequest, callback: RateKeeperAddMeterCallback): void;