Skip to content

Instantly share code, notes, and snippets.

View mackenly's full-sized avatar
👨‍💻
Focusing

Mackenly Jones mackenly

👨‍💻
Focusing
View GitHub Profile
@mackenly
mackenly / starter.java
Last active February 16, 2022 01:45
IntelliJ Java Class Code Template NE CS1
/**
* -------------------------------------------
* File name: ${NAME}.java
* Project Name: ${NAME}
* Created By: John Doe
* Email: username@stumail.northeaststate.edu
* Course & Section: CISP 1020 MW
* -------------------------------------------
*/
@mackenly
mackenly / ghost-ayrshare.js
Last active November 2, 2022 19:56
Ghost to Ayrshare (social channel distribution) Integration
/*
* Name: Ghost-Ayrshare Integration
* Desc: CloudFlare Worker To Consume Ghost Webhooks and Share On Social With Ayrshare
* Created by: Mackenly Jones (mackenly.com)
* Date: 10/26/2021
* Updated: 11/2/2022
* Requres: Ghost CMS, CloudFlare Worker, and Ayrshare Account
* Variables: Store your Ayrshare API key as API_KEY and referal code as REF_CODE into your Worker's enviormental variables
*
* The referal code is just a basic way to make sure requests are from you.
@mackenly
mackenly / moneyrounder.js
Created September 10, 2021 04:37
Round Money Up To the Nearest Cent (2 ways)
function moneyRounder(money) {
return (money - (money % 1)) + (1 - ((Math.floor((1 - (money % 1)) * 100)) / 100));
}
// Option 1: Call the above function
console.log(moneyRounder(33.3333333))
// Option 2: Multiply your money by 100, use the Math.ceil(), then divide by 100
console.log(Math.ceil(100*33.3333333)/100)
@mackenly
mackenly / copyright.html
Created April 21, 2021 06:56
Auto Copyright Text
@mackenly
mackenly / index.js
Last active April 7, 2021 06:28
Ghost to ConvertKit Connector
/*
Serverless Function to connect Ghost to ConvertKit
Required Enviroment Vairables:
API_KEY - Your ConvertKit API Key
FORM_ID - The ConvertKit form's ID you wish to subscribe users to
TAG_ID - Tag to mark users with in ConvertKit
Ghost Settings:
In Ghost create a new custom integration and add webhooks for new member and