Skip to content

Instantly share code, notes, and snippets.

View cameronapak's full-sized avatar
:electron:
Jesus Saves

Cameron Pak cameronapak

:electron:
Jesus Saves
View GitHub Profile
@cameronapak
cameronapak / html-to-text.js
Created March 28, 2020 00:07
Bible.com - Strips all HTML that comes back from devotional content and adds spacing and escaping in its proper place.
/**
* Converts HTML from a Bible plan to String
* - REQUIRES: entities
*/
const entities = require('entities')
/* source: https://stackoverflow.com/a/1144788 */
function replaceAll(str, find, replace) {
return str.replace(new RegExp(find, 'g'), replace)
}
@cameronapak
cameronapak / locale-storage-cache-api.js
Last active December 12, 2021 05:38
A simiple way to cache an API call using localStorage.
// Locale Storage API caching solution.
// Idea from dagalti from Stack Overflow. See https://stackoverflow.com/a/64095328/6598861.
const internalKey = 'local-storage-caching'
/**
* Set API call in cache: a localStorage caching solution.
*
* @param {object} params - The function params.
* @param {number} [params.cacheLifetime] - Duration in seconds of the cache.
* @param {string} params.key - A unique key to get and request data from localStorage.
@cameronapak
cameronapak / launch.json
Last active December 17, 2021 21:08
Launch Partner Portal Server and Front-end in ONE CLICK!
{
// Ths file will exist in .vscode/launch.json in the Partner Portal Front-end Project!
"version": "0.2.0",
"configurations": [
{
// This is a custom command found in my .zshrc. Inside of this command below, write
// a command to start your Partner Portal API server. (Note: Make sure to run rvm
// to get the proper Ruby version.)
"command": "pp-api-start",
"name": "Start Server",
@cameronapak
cameronapak / dale.svg
Created March 28, 2022 19:23
Example of an SVG that animates - No JS. No CSS.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cameronapak
cameronapak / alpine-fade-in-img-directive.js
Last active December 16, 2023 05:53
A potential way to easily fade in images using a custom Alpine directive. This helps prevent page jumping on image load.
function encodeSvg(svgString) {
// https://gist.github.com/jennyknuth/222825e315d45a738ed9d6e04c7a88d0?permalink_comment_id=4601690#gistcomment-4601690
return svgString.replace(/[<>#%{}"]/g, (x) => '%' + x.charCodeAt(0).toString(16));
}
function createLoadingSvg(loadingColor) {
return `<svg width="1" height="1" viewBox="0 0 1 1" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="${loadingColor}"/></svg>`;
}
function getLoadingBackgroundImage(el, loadingColor) {
@cameronapak
cameronapak / temporary-email-domains.js
Created January 5, 2024 11:25
List of temporary email domains that should be blocked by default lol
export const temporaryEmailDomains = [
"mailinator.com",
"10minutemail.com",
"guerrillamail.com",
"temp-mail.org",
"sharklasers.com",
"tempmail.de",
"mintemail.com",
"maildrop.cc",
"temp-mail.ru",

Free AI Prompt for Christian Chatbots

Important

This information has moved to https://go.faith.tools/skills and will continue to be updated there

Note

You can get a free copy of the Berean Standard Bible, a very approachable and readable Bible translation, at https://berean.bible/downloads.htm. Please consider using the resources they have available as training material or resources for your chatbot to have better context of God's Word.

Note

I've written the Unofficial Rules for AI Apps for Christians and hope it's a blessing for those interested in creating for the Christian audience and using AI

@cameronapak
cameronapak / christian-app-uri-schemes.md
Last active September 19, 2024 09:43
Christian App URI Schemes. The purpose of this directory of app scheme URI's is to make it easy for you to link from your app to other Christian apps, with the heart of unity.

image

App Scheme URI's for Christian Apps

The purpose of this directory of app scheme URI's is to make it easy for you to link from your app to other Christian apps, with the heart of unity.

Curated by https://faith.tools, the best place to find and distribute apps for Christians.

Share this list easily: https://dub.sh/ft-uri-schemes

@cameronapak
cameronapak / open-api-spec-homeless-resource.yml
Created February 27, 2025 20:55
Homeless Helper by OurTechnology.co (beta) - Open API Spec
openapi: 3.0.1
info:
title: Typesense Resource Search API
description: API to search for resources using Typesense.
version: 1.0.0
servers:
- url: https://cameronpak-homeless.web.val.run
paths:
/resources:
get:
@cameronapak
cameronapak / ft-featured-apps-embed.js
Created April 24, 2025 17:07
faith.tools featured apps script embed