Skip to content

Instantly share code, notes, and snippets.

View bobeckert's full-sized avatar
🚂

Bob Eckert bobeckert

🚂
View GitHub Profile
@samrolken
samrolken / get_context.sh
Created November 26, 2023 19:36
This is a little script I wrote for my own use. It gets source code files from the current directory and includes them in the output, filtering out huge source code files and sorting them by last modified. The idea is that this should grab the source code content for the code I'm working on up to a certain amount, so I can paste it into ChatGPT.
#!/bin/bash
# Parameters with default values
max_size=${1:-25} # Max size in kilobytes
output_size=${2:-50} # Max output size in kilobytes
# Extensions array - easy to add more extensions
declare -a extensions=("*.c" "*.cpp" "*.rb" "*.js")
# Temporary file to store intermediate results
@henrik242
henrik242 / Global macOS hotkeys for Google Meet, Spotify and others using AppleScript and Fastscripts.md
Last active March 28, 2024 17:25
Global macOS hotkeys for Google Meet, Spotify and others using AppleScript and Fastscripts
  1. Open Automator.app
  2. Create new Quick Action
  3. Select Run AppleScript
  4. Add this:
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
	set inputVolume to 100
	display notification "Volume set to 100" with title "✅ Microphone is on"

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@sdague
sdague / discover_scenes.py
Created November 21, 2016 11:53
Discover hue groups and scenes
#!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT