Skip to content

Instantly share code, notes, and snippets.

@jordanlambrecht
jordanlambrecht / NorthBathroomAmbient.yaml
Created February 20, 2021 03:32
Home Assistant - Google Home - N Bathroom - Ambient Sounds To Poop To
alias: Google Home - N Bathroom - Ambient Sounds To Poop To
description: 'After the N bathroom light has been on for 20s, Check to make sure GH is not in use, then set the volume to 0 and select an ambient track based on time of day, and cast it to the google home for 10 minutes.'
trigger:
- platform: device
type: turned_on
device_id: 43159d577b25076ba654bfbe4f07b252
entity_id: switch.north_bathroom_light
domain: switch
for:
hours: 0
@jordanlambrecht
jordanlambrecht / .gitignore
Created June 7, 2021 04:32
Jordan's Git Ignore Template
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
# ignore everything in the root except the "wp-content" directory.
!wp-content/
# ignore everything in the "wp-content" directory, except:
@jordanlambrecht
jordanlambrecht / email-generator-result.php
Created July 30, 2021 16:38
Two php files that Pixel Bakery uses in conjunction to generate our employee's email signatures for Gmail.
<?php
$phoneInput = $_REQUEST['phonepretty'];
$phonePretty = preg_replace('/\D/', ' ', $phoneInput );
$phoneURL = preg_replace('/\D/', '', $phoneInput);
$name = $_REQUEST['name'];
$position = $_REQUEST['position'];
?>
npm init @vitejs/app
code .
echo "# pb-oct-2022" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:jordanlambrecht/pb-oct-2022.git

active: true client: Backcountry title: Gearhead Magic date: '2022-01' tags:

- 2d animation

- 3d animation

- Motion design

- 3d modeling

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html data-editor-version="2" class="sg-campaigns" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
<!--[if !mso]><!-->
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<!--<![endif]-->
<!--[if (gte mso 9)|(IE)]>
<xml>
@jordanlambrecht
jordanlambrecht / createMacUser.sh
Last active February 25, 2024 03:46
MacOS: Create New System User
#!/bin/bash
## This code is based off of https://raw.githubusercontent.com/Servarr/Wiki/master/servarr/servarr-install-script.sh and re-worked for MacOS users
### Boilerplate Warning
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
#EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
#MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
#NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
@jordanlambrecht
jordanlambrecht / index.html
Created February 13, 2021 02:48
Layered Pinning From Bottom - ScrollTrigger
<header >
<section class="header-container blue">
<h1>Layered pinning from bottom</h1>
<p>A simple example where overlapping panels reveal from the bottom.</p>
<div class="scroll-down">Scroll down
<div class="arrow"></div>
</div>
</section>
</header>
@jordanlambrecht
jordanlambrecht / docker-compose.yml
Created March 24, 2024 04:16
Docker-Compose Template
---
name: PROJECT_NAME
version: "3.8"
# ╔══════════════════════════════════════════════════════════════════════════════╗
# ║ ║
# ║ TEMPLATE ║
# ║ ║
# ╚══════════════════════════════════════════════════════════════════════════════╝
# COMMON SERVICES FRAGMENT
@jordanlambrecht
jordanlambrecht / NotionDateDifferenceTwxtFormatter.js
Created March 28, 2024 20:02
Notion Formula: Time Difference in Years, Months, and Days
# This formula calculates the difference between the current date and a specified “Date Billed” property in Notion. It breaks down the time difference into years, months, and days, and formats the output in a human-readable string. The formula also correctly pluralizes the time units and omits any unit that has a value of zero.
# Logic:
# - if the date range is less than a month, hide the month and years text so it doesn't show 0
# - if the time period = 1, make it singular instead of plural
# - my example uses a date column called 'Date Billed' and outputs to a column named 'Past Due'
# - Not 100% accurate, as it assumes there are 30 days in a month