Skip to content

Instantly share code, notes, and snippets.

View thomasbachem's full-sized avatar

Thomas Bachem thomasbachem

View GitHub Profile
@thomasbachem
thomasbachem / git-edit
Created March 7, 2025 06:32
git edit – Easily edit commits via interactive rebase
#!/bin/zsh
# git edit – Easily edit commits via interactive rebase
# usage: `git edit <commit> [-m | --message-edit]`
#
# This Git command script allows you to edit/modify/modify
# previous Git commits easily. It essentially is a more
# convenient version of using `git rebase --interactive`
# for that use case.
#
@thomasbachem
thomasbachem / Open in Google Meet Chrome App.md
Last active February 26, 2025 16:10
Always open Google Meet links in Google Meet Chrome app on macOS

Open Google Meet links in Google Meet Chrome app on macOS by default

I you prefer to have Google Meet links automatically open in the official Google Meet Chrome app on Mac with its own Dock icon instead of in a browser tab, this is the way to go:

Step 1: Setup Chrome App

Install the official Google Meet Chrome web app by:

  1. Navigating to meet.google.com
  2. Then either clicking on the install icon (computer screen with downward arrow) in Chrome's address bar or on "" ▸ "Save and share""Install page as app"

Step 2: Create AppleScript Proxy App

@thomasbachem
thomasbachem / fixRoundupFunctionForExcelExport.gs
Created May 20, 2016 10:07
Google Sheets: Script to fix ROUNDUP() to be compatible with Excel export
// Excel needs ROUNDUP() to always have a second argument while in Google Sheets it defaults to 0.
// This script adds the missing ";0" to any use of ROUNDUP() in the current spreadsheet.
function fixRoundupForExcel() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
// Go thru each sheet
var sheets = ss.getSheets();
for (var s = 0; s < sheets.length; s++) {
var sheet = sheets[s];
var range = sheet.getDataRange();
From: Email Tester <[email protected]>
To: [email protected]
Subject: HTML Email Image Embedding Test
MIME-Version: 1.0
Date: Fri, 29 Nov 2013 11:07:39 +0100
Message-Id: <[email protected]>
Content-Type: multipart/mixed; boundary="2013112911112939:89504:2"
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
<?php
/**
* Uses a concat() statement to provide proper escaping of single
* and double quotes for XPath strings.
*
* @link http://kushalm.com/the-perils-of-xpath-expressions-specifically-escaping-quotes
* @param string $value
* @return string
*/