Skip to content

Instantly share code, notes, and snippets.

# This script will send a message to idle Google Home speakers (with an optional speaker filter) and to mobile phones.
alias: TTS To Idle Google Speakers and Phones
description: >-
This script will send a message to idle Google Home speakers (with an optional
speaker filter) and to mobile phones.
fields:
message:
name: Message
description: The message to announce
@imthenachoman
imthenachoman / Developing a GAS Powered Google Workspace Add-on And Launching It To The Marketplace.md
Last active January 22, 2026 11:22
Developing a GAS Powered Google Workspace Add-on And Launching It To The Marketplace
@imthenachoman
imthenachoman / 00 Debian Snapper Update.md
Last active July 6, 2026 03:58
Debian snapper apt script to include full apt command including arguments as snapshot description

This gist includes an enhancement to Debian's snapper package.

The current (as of 2023-07-23) snapper package includes an apt configuration that will automatically take snapper snapshots when you use apt to install/remove/etc. It will add use "apt" as the description of the pre/post snapshot.

With the below changes to the /etc/apt/apt.conf.d/80snapper file and associated dpkg-pre-post-snapper.sh file, snapper will include the full apt command, including the arguments, in the snapshot description.

For example:

$ sudo apt install funky
@imthenachoman
imthenachoman / BofA and PNC Daily Balance Consolidator.js
Last active March 11, 2020 20:16
BofA and PNC daily balance e-mail consolidator with running tally
var dailyBankingHistoryGmailSearchQuery = '(from:(onlinebanking@ealerts.bankofamerica.com) subject:("Your Available Balance") "your available balance") OR (from:(pncalerts@pnc.com) subject:(("Your Credit Card Balance" AND -"Your Credit Card Balance Is") OR "Your Savings Account Balance" OR "Your Checking Account Balance"))';
var dailyBalanceDaysToKeep = 5;
function getDailyBankBalance()
{
// get all the emails
var emailThreads = GmailApp.search(dailyBankingHistoryGmailSearchQuery);
// if we have no mails then stop
if(!emailThreads.length) return;
@imthenachoman
imthenachoman / keybase.md
Created December 8, 2019 03:56
keybase.md

Keybase proof

I hereby claim:

  • I am imthenachoman on github.
  • I am imthenachoman (https://keybase.io/imthenachoman) on keybase.
  • I have a public key whose fingerprint is 44EC 4F75 2238 9751 A658 C802 4A5E 04FD 2EA2 32D7

To claim this, I am signing this object:

@imthenachoman
imthenachoman / getContactDates.js
Created September 21, 2017 03:30
gets all dates (like birthdays and anniversaries) from Google Contacts and sends an e-mail with their details
var EMAIL_TO = "...@gmail.com";
var NUM_ADDITIONAL_DAYS = 8;
var TODAY = new Date((new Date()).toDateString());
var ONE_DAY = 24*60*60*1000;
function getContactDates()
{
var todayYear = TODAY.getFullYear();
var todayNumber = TODAY.getTime();
// date we want to go back to for previous dates
@imthenachoman
imthenachoman / nachoDateDiff.js
Last active August 22, 2017 22:53
javascript pretty date difference with year, month, day
function nachoDateDiff(startDate, endDate)
{
// if start date is past end date stop
if(startDate > endDate) return null;
// calc the various start/end dates
var sy = startDate.getFullYear(),
ey = endDate.getFullYear(),
sm = startDate.getMonth(),
em = endDate.getMonth(),
@imthenachoman
imthenachoman / nXHR.js
Last active October 12, 2016 17:52
cross-browser (IE 8+) XMLHttpRequest that reuses an existing request for recurring requets
/* nXHR
* ----------------------------------------------------------------------------
* cross-browser (IE 8+) XMLHttpRequest that reuses an existing request for recurring requets
*
* url : https://gist.github.com/imthenachoman/8b4bbc1e4aa39fc5e6ef
* author : Anchal Nigam
* e-mail : imthenachoman@gmail.com
*
* Copyright (c) 2015 Anchal Nigam (imthenachoman@gmail.com)
* Licensed under the MIT license: http://opensource.org/licenses/MIT
@imthenachoman
imthenachoman / nCreateElement.js
Last active May 23, 2021 00:34
a JS shim to quickly create DOM elements using document.createElement
/* nCreateElement
* ----------------------------------------------------------------------------
* a JS shim to quickly create DOM elements using document.createElement
*
* url : https://gist.github.com/imthenachoman/4a72ff3f51133ab7eae3
* author : Anchal Nigam
* e-mail : imthenachoman@gmail.com
*
* Copyright (c) 2015 Anchal Nigam (imthenachoman@gmail.com)
* Licensed under the MIT license: http://opensource.org/licenses/MIT
@imthenachoman
imthenachoman / rAF.js
Last active October 12, 2016 17:54 — forked from paulirish/rAF.js
cross-browser (IE 8+) animation framework with easings
/* rAF
* ----------------------------------------------------------------------------
* cross-browser (IE 8+) animation framework with easings
*
* url : https://gist.github.com/imthenachoman/d19dc4cf6e53ad3664ea
* author : Anchal Nigam
* e-mail : imthenachoman@gmail.com
*
* Copyright (c) 2015 Anchal Nigam (imthenachoman@gmail.com)
* Licensed under the MIT license: http://opensource.org/licenses/MIT