Skip to content

Instantly share code, notes, and snippets.

View kkemple's full-sized avatar

Kurt Kemple kkemple

View GitHub Profile
import { axios } from "@pipedream/platform"
import { format } from "date-fns"
export default defineComponent({
props: {
notion: {
type: "app",
app: "notion",
}
},
@kkemple
kkemple / etl
Last active April 12, 2022 18:20
// To use any npm package, just import it
// import axios from "axios"
import striptags from "striptags"
export default defineComponent({
async run({ steps, $ }) {
const description = striptags(steps.trigger.event.description, ['br']).replace(/<br>/g, '\n')
const eventTypeMatch = description.match(/Event\sName:\s(\w+)/)
const zoomLink = description.match(/(https:\/\/(?:[\w-]+\.)?zoom.us\/j\/\d+\?pwd=\w+)/)
@kkemple
kkemple / DarkModeImage.js
Created November 28, 2021 18:43
An image component that supports different images for dark mode.
export default function DarkModeImage({ light, dark, alt }) {
return (
<picture>
<source srcSet={dark} media="(prefers-color-scheme: dark)" />
<img src={light} alt={alt} />
</picture>
);
}
@kkemple
kkemple / Dockerfile
Created May 26, 2021 17:53
Snippets for setting up federated GraphQL APIs
FROM node:14
# Create app directory
WORKDIR /usr/src/app
COPY package*.json ./
# Install app dependencies
RUN npm install
@kkemple
kkemple / gatsby-node.js
Created October 22, 2020 17:31
gatsby source plugin for Oribt
// constants for your GraphQL Post and Author types
const fetch = require("isomorphic-fetch")
const MEMBER_NODE_TYPE = `OrbitMember`
const ORBIT_API_KEY = `<YOUR_KEY_HERE>`
exports.sourceNodes = async ({
actions,
createContentDigest,
createNodeId,
@kkemple
kkemple / autonomous.txt
Created June 24, 2020 17:37 — forked from Khaledgarbaya/autonomous.txt
Instructions on how to reset the autonomous desk. This fixes a problem where the desk will not lower (also reportedly fixes incorrectly reported heights).
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these
> steps thoroughly.
Reset Steps:
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds.
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass.
3. Release both buttons.
4. Press the down buttons until the desk beeps one more time or 20 seconds pass.
import React, { useState, useEffect } from "react";
import {
TouchableOpacity,
View,
KeyboardAvoidingView,
Modal,
ScrollView,
StyleSheet,
StatusBar
} from "react-native";
import { useState, useEffect } from "react";
import { Auth, API, graphqlOperation } from "aws-amplify";
import parse from "date-fns/parse";
import format from "date-fns/format";
import formatDistance from "date-fns/formatDistance";
import { getEvent } from "../graphql/queries";
import {
onUpdateEvent,
import React, { memo, useState, useEffect } from "react";
import { SafeAreaView, View, TouchableOpacity } from "react-native";
import { Agenda } from "react-native-calendars";
import styled from "@emotion/native";
import { FontAwesome5 } from "@expo/vector-icons";
import { Auth, API, graphqlOperation } from "aws-amplify";
import eachDayOfInterval from "date-fns/eachDayOfInterval";
import parse from "date-fns/parse";
import startOfMonth from "date-fns/startOfMonth";
import startOfDay from "date-fns/startOfDay";
package com.example.nycworkshopexample;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import com.amazonaws.amplify.generated.graphql.CreateTodoMutation;
import com.amazonaws.amplify.generated.graphql.ListTodosQuery;
import com.amazonaws.amplify.generated.graphql.OnCreateTodoSubscription;