Skip to content

Instantly share code, notes, and snippets.

View timReynolds's full-sized avatar

Tim Reynolds timReynolds

View GitHub Profile
@timReynolds
timReynolds / Main.cs
Created April 14, 2024 07:05
Area Cal
using System;
using System.Collections.Generic;
interface IShapeCalculator
{
void CalculateAndDisplayArea();
}
class CircleCalculator : IShapeCalculator
{
@timReynolds
timReynolds / README.md
Created June 2, 2023 08:46
GraphQL Conventions

GraphQL Conventions

Abstract

The purpose of this document is to establish standards for GraphQL services types ensuring consistency across our graph.

Table of contents

@timReynolds
timReynolds / CurrentUserContext.ts
Created August 25, 2021 09:50
Current User React Hook and Context
import React from "react";
import { ICurrentUser } from "../../../types";
import { IUserProfile } from "../../../userProfile/types";
interface ICurrentUserContextProps {
currentUser?: ICurrentUser;
profile?: IUserProfile;
accessToken: () => Promise<string | undefined>;
refetchCurrentUser: () => Promise<void>;
}
@timReynolds
timReynolds / cloudbuild.yaml
Created January 2, 2019 11:19
Percy setup for cloudbuild CI
- name: "buildkite/puppeteer:v1.11.0"
args: ["npm", "run", "test:visual"]
env:
- "PERCY_BRANCH=$BRANCH_NAME"
- "PERCY_COMMIT=$COMMIT_SHA"
@timReynolds
timReynolds / File
Created September 20, 2018 08:48
IFormFile to Stream example
using System.IO;
namespace VestaProperty.Core.File
{
public class File
{
public File()
{
this.Content = (Stream) new MemoryStream();
}
@timReynolds
timReynolds / ListingImageApi.js
Created September 14, 2018 16:34
File upload
const fetch = require("isomorphic-unfetch");
const FormData = require("form-data");
class ListingAPI {
async addListingImage(args) {
const fileData = "";
const chunk;
const file = await args.file;
@timReynolds
timReynolds / yuck.yaml
Created August 28, 2018 19:52
Yuck.yaml
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ include "fullname" . }}
namespace: default
labels:
app: {{ include "name" . }}
spec:
replicas: {{ .Values.replicaCount }}
selector:

Keybase proof

I hereby claim:

  • I am timreynolds on github.
  • I am timreynolds (https://keybase.io/timreynolds) on keybase.
  • I have a public key ASB5F_W1Ab7Ah37e-cVI32GNNvXZnulAQY1NWRu1Mg7WdQo

To claim this, I am signing this object:

@timReynolds
timReynolds / example.js
Created June 17, 2017 12:04
Segment.com with next.js
<Head>
<script dangerouslySetInnerHTML={{ __html: `
var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="4.0.0";
@timReynolds
timReynolds / Constants
Last active October 20, 2016 10:01
NServiceBus Notification FailedMessageResponder
public const string FailedMessageResponderNotResponding = "No failed message response defined for {0}";
public const string FailedMessageResponderResponding = "Creating {0} for failed message {1}";