Skip to content

Instantly share code, notes, and snippets.

View ortonomy's full-sized avatar

Gregory Orton ortonomy

View GitHub Profile
@ortonomy
ortonomy / city.svg
Last active September 8, 2019 05:14
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import React from 'react'
import styled from 'styled-components'
import { version } from '../../../../package.json'
import { FlexContainerPositionable } from '../../../components/common/Layout'
import { SmallLightBoldText } from '../../../components/common/Text'
import * as Mixins from '../../../styles/Mixins'
const VersionContainer = styled(FlexContainerPositionable)`
${Mixins.Shadow}
${Mixins.BackgroundColor}
import React from 'react'
import { withRouter } from 'next/router'
export const AuthContext = React.createContext({
isAuthenticated: false,
token: null,
user: null,
})
/**
@ortonomy
ortonomy / stripe.php
Created April 15, 2021 01:08
stripe.php
<?php
$account = $this->client->accounts->create(
[
'type' => 'express',
'email' => $user->email,
'business_profile' => [
'mcc' => '7392',
'url' => 'happyconsults.com'
],
@ortonomy
ortonomy / .zshrc
Created April 29, 2022 04:50
.zshrc - spaceship prompt
# If you come from bash you might have to change your $PATH.
export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"
export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"
export PATH="/opt/homebrew/opt/openssl@3/bin:$PATH"
# You may need to manually set your language environment
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
@ortonomy
ortonomy / altair_aws_cognito_confidential_client.js
Created February 6, 2023 02:17
Altair GraphQL client pre-request script for AWS Cognito confidential client login
const CryptoJS = await altair.importModule('crypto-js');
const b64Decode = await altair.importModule('atob');
const collectEnvironmentVariables = () => {
const clientId = altair.helpers.getEnvironment('AwsCognitoClientId')
const clientSecret = altair.helpers.getEnvironment('AwsCognitoClientSecret')
const region = altair.helpers.getEnvironment('AwsCognitoRegion')
const username = altair.helpers.getEnvironment('AwsCognitoUsername')
const password = altair.helpers.getEnvironment('AwsCognitoPassword')