Skip to content

Instantly share code, notes, and snippets.

View joshkadis's full-sized avatar
💭
🍕

Josh Kadis joshkadis

💭
🍕
View GitHub Profile
@joshkadis
joshkadis / Code.gs
Created April 25, 2020 12:53
Gmail autoarchive by label
// Will be checked against lowercased label names
var autoarchiveLabels = {
newsletters: 2
};
// Get cutoff date for a specific label
function labelDelayDate(labelName) {
if (!autoarchiveLabels[labelName.toLowerCase()]) {
return false;
}
@joshkadis
joshkadis / CR.js
Created January 17, 2020 21:33
Congressional Record search interface
/* eslint-disable react/prop-types */
import { Component } from 'react';
import Select from 'react-select';
/**
* Render a search result in the center well
*
* @param {Function} props.addToCollHandler
* @param {Array} props.collected
* @param {Object} props.result
@joshkadis
joshkadis / ingestActivityFromStravaData.js
Last active January 16, 2020 00:17
Node.js and React samples from The Most Laps (themostlaps.com)
const Activity = require('../../../schema/Activity');
const {
activityCouldHaveLaps,
getActivityData,
} = require('../../refreshAthlete/utils');
const {
compileStatsForActivities,
updateAthleteStats,
} = require('../../athleteStats');
const { slackError } = require('../../slackNotification');