Skip to content

Instantly share code, notes, and snippets.

View mayneyao's full-sized avatar

Mayne mayneyao

View GitHub Profile
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 3, 2024 03:58
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@LawJolla
LawJolla / gatsby-node.js
Created September 18, 2017 05:15
Gatsby Create pages from API
// Lightweight GraphQL generic client
const GraphQLClient = require('graphql-request').GraphQLClient;
const crypto = require('crypto');
const path = require('path');
const api = require('./api_constants');
//GraphQL query string to get all inventory, filtering by a specific dealer
const vehicles = `
{
allDealerships(filter:{ name:"Wheel Kinetics"}) {
@ahmed-musallam
ahmed-musallam / Circular.js
Created January 25, 2018 22:11
A simple circular javascript data structure (backed by an array)
/**
* A simple circular data structure
*/
function Circular(arr, startIntex){
this.arr = arr;
this.currentIndex = startIntex || 0;
}
Circular.prototype.next = function(){
var i = this.currentIndex, arr = this.arr;
// unofficial sqlite3 types.
// These are typed only for my scope
declare module "@sqlite.org/sqlite-wasm" {
type InitOptions = {
print: (...msg: any[]) => void;
printErr: (...msg: any[]) => void;
};
declare type PreparedStatement = {