Skip to content

Instantly share code, notes, and snippets.

View cameronapak's full-sized avatar
🤓
Happy

Cameron Pak cameronapak

🤓
Happy
View GitHub Profile
@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

Bible Bot Christian Companion AI Prompt

You can copy, translate, modify, and distribute this resource, without restriction, and without needing to ask permission.

skip to prompt

This post offers a Bible-focused AI prompt you can use or adapt for your projects! I believe AI can be a powerful tool for Christian growth, and I want to contribute to its development.

Here's the Background:

@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",
@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 / 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 / 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 / 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 / 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)
}