Skip to content

Instantly share code, notes, and snippets.

View cdaz5's full-sized avatar

Chris D'Ascoli cdaz5

View GitHub Profile
"scripts" : {
"debugger": "open 'rndebugger://set-debugger-loc?host=localhost&port=19001'"
}
// Whatever file you create your store in...
import { applyMiddleware, createStore } from 'redux';
import thunk from 'redux-thunk'; // or sagaMiddle whatever you prefer
import { composeWithDevTools } from 'redux-devtools-extension';
import rootReducer from '//pathToRootReducer';
const middleware = [thunk]; // or sagaMiddleware whatever you use
$ yarn run debugger // or whatever you changed the key to in your package.json scripts
// app.json
{
"expo": {
"name": "Sample App",
"sdkVersion": "25.0.0",
"icon": "./sample-icon.png",
"description": "Basic app",
"version": "1.0.1",
"orientation": "portrait",
"ios": {
$ exp build:ios // or
$ exp build:android
const { GraphQLServer } = require("graphql-yoga");
const fetch = require("node-fetch");
const typeDefs = `
type Query {
getPokemon(id: Int!): Pokemon
}
type Pokemon {
id: Int
///////////// Initial Setup /////////////
const dotenv = require('dotenv').config();
const express = require('express');
const crypto = require('crypto');
const cookie = require('cookie');
const nonce = require('nonce')();
const querystring = require('querystring');
const axios = require('axios');
@cdaz5
cdaz5 / index.js
Last active April 25, 2018 15:01
AWS Lambda Example
// require in our request library.
var request = require("request");
// exports.handler must match the name of the handler given to AWS in the Handler section below Function Code
exports.handler = function(event, context, callback) {
// create our URL, you could make this dynamic with template literals and use the info you provide it via a POST (we'll set
// up our HTTP methods in part 2), however for this simple example we're hard coding just to show you how it all works.
var url = 'https://swapi.co/api/people/1';
@cdaz5
cdaz5 / PulseLoader.js
Last active May 2, 2018 20:57
PulseLoader Component
import React from "react";
import styled, { keyframes } from "styled-components";
// we create our pulse effect with the below keyframe
const pulse = keyframes`
0% {
transform: scale(0);
opacity: 1;
}
100% {
@cdaz5
cdaz5 / BounceLoader.js
Created May 2, 2018 21:19
BounceLoader.js
import React from "react";
import styled, { keyframes } from "styled-components";
// we create our bounce effect with the below keyframe
const bounce = keyframes`
0%, 75%, 100% {
transform: translateY(0px)
}
25% {
transform: translateY(-30px)