Skip to content

Instantly share code, notes, and snippets.

View thebigredgeek's full-sized avatar
💭
Considering new contract opportunities at this time

Andrew E. Rhyne thebigredgeek

💭
Considering new contract opportunities at this time
View GitHub Profile
@thebigredgeek
thebigredgeek / app.js
Last active July 21, 2019 20:03
Overload Lead Generation App
import React, { useState, useRef } from 'react';
import { StyleSheet, View, KeyboardAvoidingView } from 'react-native';
import { Image, ThemeProvider, Input, Button } from 'react-native-elements';
import validator from 'validator'
import axios from 'axios'
import constants from './constants'
const { colors } = constants
@thebigredgeek
thebigredgeek / api.js
Created July 21, 2019 19:45
Overload Lead Gen API
const express = require('express');
const helmet = require('helmet');
const axios = require('axios');
const bodyParser = require('body-parser')
const client = axios.create({
baseURL: 'https://api.prosperworks.com/developer_api',
headers: {
'X-PW-AccessToken': process.env.COPPER_CRM_API_KEY,
'X-PW-Application': 'developer_api',
@thebigredgeek
thebigredgeek / common.js
Created October 21, 2017 03:37
common class stuff in cs
import React, { PureComponent } from 'react';
import { autobind } from 'core-decorators';
export default class Button extends PureComponent {
@autobind
_handleOnClick (e) {
e.preventDefault();
console.log('I was clicked!');
}
render () {
import { Permissions, Notifications } from 'expo';
import { Platform } from 'react-native';
import client from '../state/apollo';
import mutation from '../graphql/mutations/userAddPushToken';
import Observable from './observable';
export const register = async () => {
@thebigredgeek
thebigredgeek / config.js
Last active April 24, 2017 01:18
RFC: "Solaris"
{
"redis": {
"host": "localhost",
"port": 6379,
"prefix": "solaris-"
},
"port": 3000
}
@thebigredgeek
thebigredgeek / demo.graphql
Last active December 9, 2016 02:58
GraphQL query demo
myUser {
# My user's ID
id
name
email
createdAt
updatedAt
Posts {
# Posts that my user has created...
id
@thebigredgeek
thebigredgeek / radio.js
Created December 7, 2016 05:05
broken radio
import React, { PropTypes } from 'react';
import classNames from 'classnames';
import { autobind } from 'core-decorators';
import withStyles from 'isomorph-style-loader/lib/withStyles';
import PureComponent from '../../components/common/pure';
import style from './radio.css';
@withStyles(style)
@thebigredgeek
thebigredgeek / baseResolvers.js
Created December 5, 2016 21:17
Breed-able Resolvers
import { AlreadyAuthenticatedError, NotAuthenticatedError, NotAuthorizedError } from '../errors/functional';
import createResolver from '../lib/createResolver';
export const baseResolver = createResolver();
export const isAuthenticatedResolver = baseResolver.createResolver(
(root, args, context) => {
if (!context.user || !context.user.id) throw new NotAuthenticatedError();
}
@thebigredgeek
thebigredgeek / location.graphql
Created December 5, 2016 17:42
Apollo / GraphQL basics
type Location implements Resource {
# Primary key
id: ID!
# Google's name for the Location
googleName: String!
# Google's ID for the Location
googleId: ID!
# Google's Place ID for the Location
googlePlaceId: ID!
# Google's Timezone ID for the Location
@thebigredgeek
thebigredgeek / input.js
Created December 1, 2016 20:42
Pure input component with external value and sticky cursor
import React, { PropTypes } from 'react';
import classNames from 'classnames';
import { autobind } from 'core-decorators'
import PureComponent from './pure';
@withStyles(style)
export default class Input extends PureComponent {
static propTypes = {
onChange: PropTypes.func.isRequired,