Skip to content

Instantly share code, notes, and snippets.

bzerangue / html-page-print-test.html
Last active August 19, 2022 15:43
nameTagContainer - MP NameTag - TEST for Secure NameTag
View html-page-print-test.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<div id="nameTagContainer" style="font-family:'Geneva','sans-serif';height:173px;width:272px;">
bzerangue / ie-only-css.html
Last active June 11, 2022 22:25
Targeting IE Only - CSS Media Query
View ie-only-css.html
<!-- IE 9 and below... -->
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie9-and-below.css" />
<!--[if !IE]>-->
This is not revealed in IE 5-9. It's still revealed in other browsers.
bzerangue /
Last active May 6, 2022 15:05
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.


  • 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 /
Last active December 20, 2022 20:21
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 / alpine-js-fetch.markdown
Created July 26, 2021 20:56
Alpine JS + fetch()
View alpine-js-fetch.markdown
bzerangue /
Last active June 21, 2021 14:38
xml2json - PHP associative array from XML encoded into JSON (from

Create plain PHP associative array from XML

Example usage:

    $xmlNode = simplexml_load_file('example.xml');
    $arrayData = xmlToArray($xmlNode);
    echo json_encode($arrayData);
bzerangue / data.csv
Created December 24, 2020 22:26 — forked from Monichre/data.csv
Demo of importing a CSV file into a Contentful space
View data.csv
first name last name age
Stephen Sugden 31
Tom Reznik 29
Justin Thomas 30
bzerangue / BulkRename.applescript
Created December 5, 2020 18:49 — forked from nrollr/BulkRename.applescript
Bulk rename files with csv file
View BulkRename.applescript
-- 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 / videoEmbed.js
Last active November 17, 2021 15:06
videoEmbed.js contentType - preview component for CMS richText PortableText editor - based off of Knut's YouTube Preview,
View videoEmbed.js
import React from 'react'
const VideoEmbedPreview = ({ value }) => {
const url = value.url
const responsiveVideoContainer = {
padding: "56.25% 0 0 0",
position: "relative"
bzerangue /
Last active February 15, 2021 21:43
Running Screenly OSE on Raspberry Pi Desktop for x86 (PC) - instructions [this is not supported - this is a hack to get it to work]

NOTE: These are not official instructions for the getting Screenly OSE to run on Raspberry Pi Desktop for x86 machines. This was a hack. These instructions are not supported. I posted them here to remember the steps I took to get it to work. Use at your own risk.

Step 1

  • Load Wifi deb files onto USB
  • Install Raspberry Pi Desktop for x86 PC - Raspberry Pi Debian Stretch - 2019-04-11-rpd-x86-stretch.iso

Step 2