git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
import type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next' | |
import jwt from 'jsonwebtoken'; | |
import {v4 as uuidv4} from 'uuid'; | |
import concatHeader from '../utils/concat-cookie' | |
import getConfig from '../utils/get-config' | |
function getSsoLoginUrl(customerId: number, storeHash: string, storeUrl: string, clientId: string, clientSecret: string) { | |
const dateCreated = Math.round((new Date()). getTime() / 1000); | |
const payload = { | |
"iss": clientId, |
const { createHttpLink } = require('apollo-link-http'); | |
const fetch = require('node-fetch'); | |
const store = require('store'); | |
const sourceNodes = require('gatsby/dist/utils/source-nodes'); | |
require('dotenv').config(); | |
const craftGqlUrl = process.env.CRAFT_GQL_URL; | |
const craftGqlToken = process.env.CRAFT_GQL_TOKEN; | |
module.exports = { |
function logger(strings,...values) { | |
var str = ""; | |
for (let i = 0; i < strings.length; i++) { | |
if (i > 0) { | |
if (values[i-1] && typeof values[i-1] == "object") { | |
if (values[i-1] instanceof Error) { | |
if (values[i-1].stack) { | |
str += values[i-1].stack; | |
continue; | |
} |
#!/usr/bin/env bash | |
declare -A params=$6 # Create an associative array | |
paramsTXT="" | |
if [ -n "$6" ]; then | |
for element in "${!params[@]}" | |
do | |
paramsTXT="${paramsTXT} | |
fastcgi_param ${element} ${params[$element]};" | |
done | |
fi |
// File: .storybook/config.js | |
import { configure, addDecorator } from '@kadira/storybook'; | |
import Theme from './../src/ui/theme'; | |
import React from 'react'; | |
import { ThemeProvider } from 'styled-components' | |
function loadStories() { | |
require('../stories'); | |
} |
<?php | |
namespace Craft; | |
class FractalPlugin extends BasePlugin | |
{ | |
public function init() | |
{ | |
craft()->templates->getTwig()->setLoader(new FractalTemplateLoader()); |
import React, { PropTypes } from 'react'; | |
import styled from 'styled-components' | |
const Wrapper = styled.div` | |
// styles here that used to be for .test | |
` | |
const Label = styled.label` | |
// label styles here | |
` |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream