Skip to content

Instantly share code, notes, and snippets.

View kevinsqi's full-sized avatar

Kevin Qi kevinsqi

View GitHub Profile
@dsmrt
dsmrt / query-aws-logs-insights.bash
Last active November 21, 2024 23:44
Using AWS CLI to query CloudWatch Logs with Insights. Looking -30 mins to now.
# this script queries aws logs with insights filtering on ERROR
# explanation of start and end times
#--start-time = unix timestamp 30 mins in the past
#--end-time = unix timestamp now
QUERY_ID=$(aws logs start-query \
--profile $profile \
--log-group-name /aws/lambda/aap-event-consumer-dev \
--start-time `date -v-30M "+%s"` \
@mitchellhuang
mitchellhuang / checkout.js
Created February 24, 2018 06:40
Stripe Elements Next.js (works with SSR)
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import { compose } from 'react-apollo';
import cookies from 'next-cookies';
import jsCookie from 'js-cookie';
import Script from 'react-load-script';
import { StripeProvider, Elements } from 'react-stripe-elements';
import Main from '../layouts/Main';
import withData from '../lib/withData';
import { viewerGraphql } from '../apollo/queries/viewer';