Skip to content

Instantly share code, notes, and snippets.

@corbindavenport
corbindavenport / table.txt
Created May 13, 2025 20:25
Gemini Gem - Table Maker
I am giving you text, images, or a document. Convert each table into HTML code using <table> elements. If a given table is divided across multiple pages or images, combine it into one HTML table.
If the table is for a product, add the following code to the HTML before the table, where "X" is the product name:
<b>X Specifications</b><br />
@corbindavenport
corbindavenport / bee-movie-apple-intelligence.txt
Created October 31, 2024 04:49
The Bee Movie script, but made professional by Apple Intelligence
According to all established principles of aviation, it is logically inconceivable that a bee should possess the ability to fly. Its wingspan is insufficient to propel its corpulent body off the ground. Nevertheless, bees defy these limitations and continue to fly despite human perceptions of impossibility.
“Yellow, black. Yellow, black. Yellow, black. Yellow, black. Yellow, black. Black and yellow!”
Barry! Breakfast is prepared!
I will be there shortly. Please wait. Hello?
- Barry?
@corbindavenport
corbindavenport / alpine-iperf3.json
Last active August 12, 2024 15:24
Docker iperf3 container for Synology NAS
{
"CapAdd" : null,
"CapDrop" : null,
"cmd" : "/bin/sh -c 'apk update && apk add iperf3 && iperf3 -s -p 7575'",
"cpu_priority" : 50,
"enable_publish_all_ports" : false,
"enable_restart_policy" : true,
"enable_service_portal" : null,
"enabled" : true,
"env_variables" : [
@corbindavenport
corbindavenport / podcast.sh
Last active April 22, 2024 22:38
Bash script to generate MP3 file and chapters text file for a podcast episode
# More information: https://blog.corbin.io/post/748500250878263296/figuring-out-podcast-chapter-markers
# This requires FFMPEG/FFPROBE and JQ to be installed
# On a Mac with Homebrew installed: brew install jq ffmpeg
echo "Audio file: "
read audio
echo "Video file: "
read video
@corbindavenport
corbindavenport / stylus-asana.json
Last active December 2, 2021 21:28
This is a custom style for the Stylus browser extension that removes link popups in Asana. To install, click the "Raw" button below, save the file, go to Stylus settings, click Import, then pick the downloaded file.
[
{
"settings": {
"openEditInWindow": false,
"openEditInWindow.popup": false,
"windowPosition": {},
"show-badge": true,
"disableAll": false,
"exposeIframes": false,
"newStyleAsUsercss": false,
@corbindavenport
corbindavenport / test-android.sh
Last active August 13, 2021 07:17
Test local WebExtension in Firefox for Android
: '
This is a script for easier testing of a WebExtension on Firefox for Android. It is a wrapper around Mozilla web-ext tool, without the need to check the list of ADB devices manually. It also automates using a Firefox-specific manifest, because Firefox for Android requires "browser_specific_settings" to be included in the manifest with the extension ID, but that string sometimes causes issues in Chromium-based browsers.
Assumed folder structure:
./test-android.sh (this script!)
./manifest.json
./manifest-firefox.json
More info about web-ext: https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/
@corbindavenport
corbindavenport / rosetta.dart
Created July 24, 2021 00:29
Check for MacOS Rosetta compatibility layer in Dart
// Function to verify Rosetta compatibility layer is enabled on ARM macOS
void checkRosetta() async {
var cpu = await getCPUArchitecture();
var rosettaInstalled = await io.Directory(
'/Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist')
.exists();
if (io.Platform.isMacOS && (cpu == 'arm64')) {
if (rosettaInstalled) {
print('[ OK ] Rosetta compatibility layer is already installed.');
} else {
@corbindavenport
corbindavenport / cpu.dart
Last active December 30, 2023 05:40
Get CPU architecture in Dart
import 'dart:io' as io;
// Function get current CPU architecture
Future<String> getCPUArchitecture() async {
if (io.Platform.isWindows) {
var cpu = envVars['PROCESSOR_ARCHITECTURE'];
return cpu;
} else {
var info = await io.Process.run('uname', ['-m']);
var cpu = info.stdout.toString().replaceAll('\n', '');
@corbindavenport
corbindavenport / screenshot-tool.sh
Last active September 22, 2022 13:35
Bash script for automatically capturing screenshots
# How to use:
# ./screenshot-tool.sh [export directory] [seconds between screenshots]
# Example: ./screenshot-tool.sh ~/Pictures 5
# Install scrot if it's not already installed
if ! [ -x "$(command -v scrot)" ]; then
sudo apt install -y scrot
fi
# Set directory to parameter $1
@corbindavenport
corbindavenport / setup.sh
Last active May 14, 2024 08:09
My personal setup script for KDE Neon
# This is designed for KDE Neon
# To run this:
# bash <(curl -s https://gist.githubusercontent.com/corbindavenport/9e164da69ab9de884dfbb6ef9c29a5aa/raw/setup.sh)
# Set device hostname and get sudo
sudo echo "Set the name for this device (no spaces!):"
read hostname
hostnamectl set-hostname $hostname
# Update packages