I hereby claim:
- I am heymartinadams on github.
- I am heymartinadams (https://keybase.io/heymartinadams) on keybase.
- I have a public key ASBjZdqMBdjUJrTfeoVWmyy7IvQ2CqTFz8DnOw9jL1CX2go
To claim this, I am signing this object:
import React from 'react' | |
import StripeCheckout from 'react-stripe-checkout' | |
import { graphql } from 'react-apollo' | |
import { userQuery, signinUser } from './graphql/user' | |
import { createCard, receiveStripeId, createPurchase, checkIfPaid, upgradeApp } from './graphql/purchase' | |
class Stripe extends React.Component { | |
constructor(props) { | |
super(props) |
onToken(token) { | |
// This is where token is received, as described in Logic #1 | |
const userId = this.props.data.user.id | |
const stripeToken = token.id | |
// Hide or remove button to prevent duplicate purchases | |
this.setState({ buttonStyle: 'button hidden' }) | |
// Logic #2 | |
this.props.createCard({ variables: { stripeToken, userId } }) | |
.then(() => { | |
console.log('Customer created...') |
import React from 'react' | |
import Button from './Button' | |
export default class Signin extends React.Component { | |
setPage = (page) => { | |
// Custom nav function here | |
} | |
validation = () => { |
I hereby claim:
To claim this, I am signing this object:
To export JavaScript, HTML, or CSS:
Visit your Webflow site: https://webflow.com/design/yoursite
Press shift
+ e
to open the export window.
Open the developer console (e.g. command
+ option
+ j
in Chrome)
Paste the following code into Webflow (yes, Webflow tells you not to paste code in there — the below snippets won’t grant anyone access to your Webflow account):
(async () => { | |
const webdriver = require('selenium-webdriver') | |
const chrome = require('selenium-webdriver/chrome') | |
const chromedriver = require('chromedriver') | |
// Run Selenium with Chrome on Node | |
chrome.setDefaultService(new chrome.ServiceBuilder(chromedriver.path).build()) | |
let driver = new webdriver.Builder() | |
.withCapabilities(webdriver.Capabilities.chrome()) |
See here.
Create a capability e.g. feature, test, dependency.
Remove a capability e.g. feature, test, dependency.
Fix an issue e.g. bug, typo, accident, misstatement.
;(async () => { | |
// Secrets | |
require('dotenv').config() | |
// Webflow | |
const Webflow = require('webflow-api') | |
// Chron job | |
const cron = require('node-cron') | |
// Selenium | |
const webdriver = require('selenium-webdriver') | |
const chrome = require('selenium-webdriver/chrome') |
const name = 'Martin' | |
const customer = false | |
const human = true | |
// The object’s keys are irrelevant, since `Object.values` just spits out the object properties into an array. | |
const ternaryOps = Object.values({ | |
1: name === 'Joe' ? 'Hi Joe!' : null, | |
2: customer ? 'Dear customer,' : null, | |
3: human ? `Hey ${name}!` : null, | |
default: 'To Whom It May Concern,' |