Skip to content

Instantly share code, notes, and snippets.

View StephenGilboy's full-sized avatar

Stephen Gilboy StephenGilboy

View GitHub Profile
PImage img;
/* Use the reset timer to know when to reset the canvas */
int resetTimer = 0;
/* We use this as a flag to know when to start the fireworks show */
bool showFireworks = false;
/* This represents how many fireworks to display */
int numberOfFireworks = 10;
/* This is a 2dimensional array where the first array is used to
keep track of the single firework, and the second array is used to
type WayToScore =
| Touchdown
| ExtraPoint
| FieldGoal
| Safety
| TwoPointConversion
type Score = Score of int
type Team = { name : string }
// we'll use this below to tell the 'teamScored' function which team to update
type WayToScore =
| Touchdown
| ExtraPoint
| FieldGoal
| Safety
| TwoPointConversion
type Score =
| HomeTeamScore of int
| AwayTeamScore of int
const changeColor = function () {
if (colorIndex < 0) {
colorIndex = 0;
} else if (colorIndex + 1 >= color.length) {
colorIndex = 0;
} else {
colorIndex = colorIndex + 1;
}
const h1 = document.getElementById(h1Id);
h1.style.color = color[colorIndex];
@StephenGilboy
StephenGilboy / createUser.js
Created August 26, 2017 18:46
How to insert a namespaced entity into google cloud datastore
const Datastore = require('@google-cloud/datastore');
const projectId = 'my-project';
const kind = 'User';
const datstore = Datastore({
projectId,
});
/* req.body example
{
"company": "Company1",
var curNode = AVAudioPlayerNode()
func play() {
curNode.play();
NotificationCenter.default.post(name: Notification.Name(rawValue: audioPlayerDidStartPlaying), object: self)
}
func pause() {
curNode.pause();
NotificationCenter.default.post(name: Notification.Name(rawValue: audioPlayerDidPause), object: self)
/TrafficingService
/Inventory
/Models
/Repository
/Pacing
/Models
/Repositry

Keybase proof

I hereby claim:

  • I am stephengilboy on github.
  • I am stephengilboy (https://keybase.io/stephengilboy) on keybase.
  • I have a public key whose fingerprint is DFAD 45F3 90C2 79C9 CB0F 7963 F022 98A4 0C5E 5324

To claim this, I am signing this object:

angular.module('locationApp', ['AdalAngular'])
.config(['$httpProvider', 'adalAuthenticationServiceProvider', function($httpProvider, adalProvider) {
var endpoints = {
"https://localhost:44377": "https://mytenant.onmicrosoft.com/APIApp"
};
adalProvider.init({
instance: 'https://login.microsoftonline.com/',
tenant: 'mytenant.onmicrosoft.com',
clientId: 'client-guid',