Skip to content

Instantly share code, notes, and snippets.

@bzerangue
bzerangue / MP-Rendering-Publications-Feeds-MP-README.md
Last active October 15, 2023 03:00
Ministry Platform Publication Feed

Rendering Publications - Ministry Platform

From the Ministry Platform Knowledge Base...

Existing Messages may be associated with a Publication via the Messages sub-page or the Publication Messages page.

A list of available Publications can be found by appending /ministryplatformapi/publications.svc to your church's base URL (for example, https://sample.church.com/ministryplatformapi/publications.svc). To populate a feed, further append the URL with the desired Publication Name as defined on the Publication record.

Once appended (for example, https://sample.church.com/ministryplatformapi/publications.svc/samplefeed), the content of all associated Messages will appear correctly formatted in an XML file. Do not include a trailing slash after the Publication Name.

@bzerangue
bzerangue / html-page-print-test.html
Last active August 19, 2022 15:43
nameTagContainer - MP NameTag - TEST for Secure NameTag
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Document</title>
</head>
<body>
<div id="nameTagContainer" style="font-family:'Geneva','sans-serif';height:173px;width:272px;">
@bzerangue
bzerangue / ie-only-css.html
Last active June 11, 2022 22:25
Targeting IE Only - CSS Media Query
<!-- IE 9 and below... -->
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie9-and-below.css" />
<![endif]-->
<!--[if !IE]>-->
This is not revealed in IE 5-9. It's still revealed in other browsers.
@bzerangue
bzerangue / home-assistant-x86-install.md
Last active July 4, 2024 16:44
Using Live Image of ZorinOS/Ubuntu/Linux Mint to Create Home Assistant OS boot drive - for x86 machines

Installing the official Home Assistant OS on an old x86 PC.

This is not a support document. Not responsible for whomever might use this. This put down for my personal use and if anyone else wants to use it they can, but this process will remove any data from the target device they are installing on.

REQUIREMENTS:

  • Intel or AMD x86 PC, monitor, keyboard, internet connection via ethernet.
  • Bootable USB thumb drive of the latest dekstop version of ZorinOS, Ubuntu, or Linux Mint
  1. Boot your machine with the bootable Zorin OS and select Try Zorin OS (you do NOT want to install it)
@bzerangue
bzerangue / debian-home-assistant-supervised_instructions.md
Last active March 26, 2024 22:16
Installing Debian + Home Assistant Supervised

Installing Debian + Home Assistant Supervised (for a linux 64 bit pc intel or amd)

Build a USB installer for Debian (non-free firmware), download the Debian Buster and build usb installer with Balena Etcher

In the Debian installer, uncheck Debian desktop environment and check ssh server and other software modules.

After installing Debian, reboot the machine and login via ssh with the username you created during setup...

Once you have SSH'd from the terminal and have logged into your new Debian machine, run the following command...

@bzerangue
bzerangue / alpine-js-fetch.markdown
Created July 26, 2021 20:56
Alpine JS + fetch()
@bzerangue
bzerangue / xml2json-PHP-README.md
Last active June 21, 2021 14:38
xml2json - PHP associative array from XML encoded into JSON (from https://github.com/tamlyn/xml2json/)

Create plain PHP associative array from XML

Example usage:

    $xmlNode = simplexml_load_file('example.xml');
    $arrayData = xmlToArray($xmlNode);
    echo json_encode($arrayData);
@bzerangue
bzerangue / data.csv
Created December 24, 2020 22:26 — forked from Monichre/data.csv
Demo of importing a CSV file into a Contentful space
first name last name age
Stephen Sugden 31
Tom Reznik 29
Justin Thomas 30
@bzerangue
bzerangue / BulkRename.applescript
Created December 5, 2020 18:49 — forked from nrollr/BulkRename.applescript
Bulk rename files with csv file
-- Store the .csv file in the same directory as the files you wish to rename
-- Replace 'username' in the path with your own (lines 3 & 10)
set csvFile to "/Users/username/Documents/index.csv"
set csvList to paragraphs of (read csvFile)
set {theID, my text item delimiters} to {my text item delimiters, ","}
repeat with csvLines in csvList
set {oldName, newName} to text items of csvLines
tell application "System Events"
set name of file oldName of folder "/Users/username/Documents/" to newName
@bzerangue
bzerangue / videoEmbed.js
Last active November 17, 2021 15:06
videoEmbed.js contentType - preview component for Sanity.io CMS richText PortableText editor - based off of Knut's YouTube Preview, https://www.youtube.com/watch?v=kLsER_zHiS4
import React from 'react'
const VideoEmbedPreview = ({ value }) => {
const url = value.url
const responsiveVideoContainer = {
padding: "56.25% 0 0 0",
position: "relative"
}