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 / 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
@mackenly
mackenly / copyright.html
Created April 21, 2021 06:56
Auto Copyright Text
@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 / 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 / Sorting.java
Created September 1, 2022 21:21
Sorting Algorithm Comparisons in Java
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;
/**
* -------------------------------------------
* File name: Main.java
* Project Name: Sorting Algorithms
* Created By: Mackenly Jones
* -------------------------------------------
@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 / Cypher.java
Created January 29, 2023 01:35
Java Ceaser Cipher
/**
* -------------------------------------------
* File name: Cypher.java
* Project Name: Ceaser Cipher
* Created By: Mackenly Jones
* Date: 4/12/22
* -------------------------------------------
*/
package CeaserCipher;
@mackenly
mackenly / state_centers.json
Created March 6, 2023 22:05
Center coordinate of each U.S. state
[
{
"state": "Alabama",
"latitude": 32.7794,
"longitude": -86.8287
},
{
"state": "Alaska",
"latitude": 64.0685,
"longitude": -152.2782
@mackenly
mackenly / sftp.yml
Last active April 15, 2023 20:36
SFTP Upload Action Template
on: push
name: 🚀 Deploy website on push
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
@mackenly
mackenly / keynote-to-images.scpt
Created June 17, 2023 22:30
Apple Script for converting a Keynote file to a folder of images. To use, create an Automator application and use an Apple Script block. Save the application to your desktop and you're good to go.
on run {input, parameters}
-- Validate input
if input is {} then
display alert "No file selected!" message "Drop a file on the action to process the keynote." as warning
return
end if
-- Declare variables
set fileName to POSIX path of (input as string)