Skip to content

Instantly share code, notes, and snippets.

View leblanck's full-sized avatar
🧇
Updating macOS...

Kyle LeBlanc leblanck

🧇
Updating macOS...
View GitHub Profile
@leblanck
leblanck / loadBookInfo.gs
Last active March 28, 2024 13:06
Used to pull book information into Google Sheets using the googleapis.com/books API endpoint
s = SpreadsheetApp.getActiveSheet();
function onOpen() {
// Creates Menu Bar Item in Google Sheets
var ui = SpreadsheetApp.getUi();
ui.createMenu('Book Menu')
.addItem('Get Book Details', 'getBookDetails')
.addToUi();
}

Keybase proof

I hereby claim:

  • I am leblanck on github.
  • I am kyleblanc (https://keybase.io/kyleblanc) on keybase.
  • I have a public key ASC7810eDnemx6lI_-VLZ-pqAMNafrV2hD-vLxdI1OLFKAo

To claim this, I am signing this object:

@leblanck
leblanck / emailattachment.sh
Created December 22, 2021 14:56
Send Email with Attachment
#!/bin/bash
uuencode /tmp/fileIn.txt fileOut.txt | mail -s "Sending txt File" [email protected]
@leblanck
leblanck / emailmecurl.sh
Created December 22, 2021 14:47
Email from Gmail using cURL
#!/bin/bash
#You should set an app specific passwd for this email service account
curl --url 'smtps://smtp.gmail.com:465' --ssl-reqd \
--mail-from '[email protected]' \
--mail-rcpt '[email protected]' \
--user '[email protected]:YourPassword' \
-T <(echo -e 'From: [email protected]\nTo: [email protected]\nSubject: Curl Test\n\nHello')
@leblanck
leblanck / sysdiagnose.sh
Created August 2, 2021 14:35
Quick System Diagnose
sudo sysdiagnose -f ~/Desktop/
@leblanck
leblanck / timeSync.sh
Created July 21, 2021 19:13
Sync Time with Apple
sudo sntp -sS time.apple.com
@leblanck
leblanck / viewConfigProfile.sh
Created March 3, 2021 19:06
Viewing Installed Configuration Profiles via CLI on macOS
profiles -C -v | grep attribute | awk '/name/{$1=$2=$3=""; print $0}' | sed 's/^ *//'
@leblanck
leblanck / bubbleSort.js
Created March 23, 2020 18:26
Bubble Sort sorting algorithm in JavaScript
function bubbleSort(arr) {
let swapped
do {
swapped = false
for (let i = 0; i < arr.length; i++) {
if (arr[i] && arr[i + 1] && arr[i] > arr[i + 1]) {
const temp arr[i]
arr[i] = arr[i + 1]
arr[i + 1] = temp
swapped = true