Skip to content

Instantly share code, notes, and snippets.

View acomito's full-sized avatar

Anthony Comito acomito

View GitHub Profile
@alfonmga
alfonmga / apollo-refreshToken-link.js
Last active September 5, 2023 22:29
Apollo refresh auth token link. It tries to refresh the user access token on the fly when API throws out an UNAUTHENTICATED error. If multiple requests fail at the same time, it queues them to re-try them later if we are able to get a new access token, otherwise we log out the user and redirect him to the login page.
@elie222
elie222 / apollo.js
Created April 3, 2017 13:47
Meteor Apollo React Native
import ApolloClient from 'apollo-client'
import Settings from './settings'
import { meteorClientConfig } from './meteorApolloClient'
const networkOptions = { uri: Settings.GRAPHQL_URL }
export const client = new ApolloClient(meteorClientConfig(networkOptions))
@nodkz
nodkz / apolloServer2019.ts
Last active August 3, 2022 11:17
GraphQL error tracking with sentry.io (ApolloServer 2019)
import express from 'express';
import { ApolloServer } from 'apollo-server-express';
import { ApolloServerPlugin } from 'apollo-server-plugin-base';
import * as Sentry from '@sentry/node';
Sentry.init({
environment: process.env.APP_ENV,
// see why we use APP_NAME here: https://github.com/getsentry/sentry-cli/issues/482
release: `${process.env.APP_NAME}-${process.env.APP_REVISION}` || '0.0.1',
dsn: process.env.SENTRY_DSN,
@emilyfeder
emilyfeder / epic_sso_handler.js
Last active October 24, 2023 22:58
Open.Epic HTTP GET decryption
import crypto from 'crypto';
import xor from 'bitwise-xor';
import querystring from 'querystring';
class EpicSsoHandler {
//encryption algorithm used by open.epic
algorithm = 'aes-128-cbc';
// hash algorithm used by the Microsoft key derivation algorithm.
// Note, no where is this actually specified. I tried several different algorithms before deciding on this one
@blackfalcon
blackfalcon / git-feature-workflow.md
Last active April 13, 2024 07:33
Git basics - a general workflow

Git-workflow vs feature branching

When working with Git, there are two prevailing workflows are Git workflow and feature branches. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited, and the focus of this article.

If you are new to Git and Git-workflows, I suggest reading the atlassian.com Git Workflow article in addition to this as there is more detail there than presented here.

I admit, using Bash in the command line with the standard configuration leaves a bit to be desired when it comes to awareness of state. A tool that I suggest using follows these instructions on setting up GIT Bash autocompletion. This tool will assist you to better visualize the state of a branc