Skip to content

Instantly share code, notes, and snippets.

View JEverhart383's full-sized avatar

Jeff Everhart JEverhart383

View GitHub Profile
@JEverhart383
JEverhart383 / category-food.js
Created January 24, 2023 13:45
Faust Custom Template Registration
import { gql } from '@apollo/client';
import * as MENUS from '../constants/menus';
import { BlogInfoFragment } from '../fragments/GeneralSettings';
import {
Header,
Footer,
Main,
Container,
EntryHeader,
NavigationMenu,
@JEverhart383
JEverhart383 / index.js
Created September 13, 2022 12:59
Products Price Query Gqty
import { getNextStaticProps } from '@faustjs/next';
import React from 'react';
import { client } from 'client';
import { getArrayFields, getFields, prepass } from 'gqty';
import { FaArrowRight } from 'react-icons/fa';
import {
Header,
Footer,
EntryHeader,
Main,
// Lives at pages/[productSlug]/index.js
import { getNextStaticProps } from '@faustjs/next';
import { client } from 'client';
import { Footer, Header, EntryHeader, Main, SEO } from 'components';
import { useRouter } from 'next/router';
import { pageTitle, is404Cpt } from 'utils';
export function ProductComponent() {
const { useQuery } = client;
function CanvasLMSClient(baseURL, accessToken) {
this.baseURL = baseURL;
this.accessToken = accessToken
this.getAllResources = function(resourceUrl, nextLink = null, resources = [] ) {
const url = nextLink ? nextLink + '&access_token=' + this.accessToken : resourceUrl;
const params = {
method: 'get',
muteHttpExceptions: true
}
const response = UrlFetchApp.fetch(url, params )
var GumroadLicenseValidator = /** @class */ (function () {
function GumroadLicenseValidator() {
}
GumroadLicenseValidator.isLicenseValid = function () {
var licenseDetails = GumroadLicenseValidator.getLicenseDetails();
if (licenseDetails) {
var gumroadResponse = JSON.parse(licenseDetails);
if (gumroadResponse.success === true
&& gumroadResponse.refunded === false
<?php
/*
Template Name: Homepage
@name Homepage Template
@since 2.0.0
@author Pavel Richter <pavel@grandpixels.com>
@copyright Copyright (c) 2014, Grand Pixels
#!/usr/bin/env python
# Written by Limor "Ladyada" Fried for Adafruit Industries, (c) 2015
# This code is released into the public domain
import time
import os
import RPi.GPIO as GPIO
import curses
function sendEmail(e){
var studentName = e.values[2];
var advisorName = e.values[1];
var studentEmail = e.values[4];
var class = e.values[8];
var email = 'Hi, ' + studentName +
'\nWe have requested an override into ' + class
+ ' on your behalf. We will contact you once a decision has been reached.\n Best,\n ' + 'Advising Staff\nSchool of World Studies Office of Advising\nVirginia Commonwealth University\n817 West Franklin Street, Suite 221\nRichmond, VA 23284-2021';
function myFunction() {
//Get a particular label used in Gmail
var label = GmailApp.getUserLabelByName('wordpress');
//Get threads within tagged with this label
var threads = label.getThreads();
//Loop through threads and get messages
@JEverhart383
JEverhart383 / Code.gs
Created August 10, 2017 19:27
Google Sheets Web App | DaVinci Center ODEO
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var USERS_TABLE = spreadsheet.getSheets()[0];
var IDEAS_TABLE = spreadsheet.getSheets()[1];
var VOTES_TABLE = spreadsheet.getSheets()[2];
function registerUser(user){
var data = getTableData(USERS_TABLE);