Skip to content

Instantly share code, notes, and snippets.

View djensenius's full-sized avatar

David Jensenius djensenius

View GitHub Profile
@djensenius
djensenius / gt3-pro-ble-protocol.md
Created April 13, 2026 04:20
Segway GT3 Pro — Bluetooth Low Energy Protocol Reference

Segway GT3 Pro — Bluetooth Low Energy Protocol Reference

Scooter model: Segway SuperScooter GT3 Pro (x3 series)

Reverse-engineered from Bluetooth packet captures, the Segway Mobility app, and the segway-ninebot-ble community docs.


Table of Contents

@djensenius
djensenius / git_new_push.fish
Created February 14, 2020 15:35
Fish shortcut function to simplify git --set-upstream
function git_new_push --description 'Shortcut to push new branch'
if not command -sq git
return 1
end
set -l repo_info (command git rev-parse --git-dir --is-inside-git-dir --is-bare-repository --is-inside-work-tree HEAD 2>/dev/null)
test -n "$repo_info"
or return
set -l rbc (__fish_git_prompt_operation_branch_bare $repo_info)
set -l b $rbc[2]
@djensenius
djensenius / flac2alac.fish
Created January 12, 2019 17:30
Fish function to convert all FLAC files in a directory to ALAC (requires ffmpeg). 🔊🎛
function flac2alac
for f in *.flac
ffmpeg -i "$f" -map 0:0 -c:a:0 alac (basename $f .flac).m4a
end
end
/*
File: KeychainItemWrapper.h
Abstract:
Objective-C wrapper for accessing a single keychain item.
Version: 1.2 - ARCified
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
/*
File: KeychainItemWrapper.h
Abstract:
Objective-C wrapper for accessing a single keychain item.
Version: 1.2 - ARCified
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of