Skip to content

Instantly share code, notes, and snippets.

View callumtempest's full-sized avatar

Callum Tempest callumtempest

View GitHub Profile
@tanaikech
tanaikech / submit.md
Created August 7, 2023 08:10
Embedding Objects in PDF using Google Apps Script

Embedding Objects in PDF using Google Apps Script

This is a sample script for embedding the objects in PDF using Google Apps Script.

Recently, I had a situation where it is required to manage PDFs using Google Apps Script. At that time, I had a situation where it is required to embed objects of texts and images in PDF using Google Apps Script. So, I created the following Class with Google Apps Script. When this Class is used, the objects of texts and images can embed in PDF.

Class EmbedObjects

@kilfu0701
kilfu0701 / send_notification_to_google_chat.sh
Created October 28, 2022 09:17
Send message to Google Chat with bash script.
#/bin/bash
set -e
# set your BOT's API KEY and TOKEN
API_KEY=******************************
API_TOKEN=****************************
## send notification to google chat with card format.
#
# sample:
@prologic
prologic / LearnGoIn5mins.md
Last active August 12, 2025 02:24
Learn Go in ~5mins
@joshuabradley012
joshuabradley012 / Object collisions with canvas
Last active June 3, 2025 18:30
An example of 2D collisions using JavaScript Canvas
class State {
constructor(display, actors) {
this.display = display;
this.actors = actors;
}
update(time) {
/**
* provide an update ID to let actors update other actors only once
@brainysmurf
brainysmurf / README.md
Last active June 21, 2024 05:53
Things one can get used to for the V8 Google Apps Scripts engine

Things one can get used to for the V8 Google Apps Scripts engine

A bit of a monologue about various syntax changes and adjustments in learning and using the tool.

Logging is slooooooow

I know. Everyone knows.

That's why I wrote a library that writes to a spreadsheet instead. Ever since I started using it I'm far more productive. I don't know how people are still putting with that god-awful lagging logger.

@tomhicks
tomhicks / plink-plonk.js
Last active October 15, 2025 13:41
Listen to your web pages
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active August 28, 2025 15:49
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active September 15, 2025 01:45
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@bpmore
bpmore / sort-tabs.txt
Created June 9, 2016 17:41
Sort Tabs in Google Spreadsheets
1. Copy/Paste the information below to the clipboard
2. Open the spreadsheet whose sheets need to be alphabetised
3. Choose Tools > Script editor > Blank (this opens a new tab in the browser)
4. Press Control+A followed by Control+V copy and paste the script in
5. Press Control+S to save the script
6. Choose Run > sortSheets
7. Go back to the spreadsheet tab to view the new sorted tab order
--Copy everything below this line--
function sortSheets () {
@rkeithhill
rkeithhill / powershell.json
Last active March 20, 2025 09:49
PowerShell snippets file for Visual Studio Code - place in your ~\AppData\Roaming\Code\User\Snippets directory
{
"Condition statement": {
"prefix": "cond",
"body": [
"$1 { $0; break }"
],
"description": "Switch condition statement"
},
"Condition single quoted string statement": {
"prefix": "condsqstr",