Skip to content

Instantly share code, notes, and snippets.

seamusdemora / gist:74c44f17938d2f78b3d0c57aa5f6f905
Created March 31, 2018 19:19 — forked from NonaSuomy/gist:a62a9a125d61fc5df748066961702ac6
Get OAUTH2.0 access token for Google Voice with a shell-script
## Authenticate with Google Voice
USAGE="`basename $0` {auth|refresh|token} ctx"
seamusdemora /
Last active April 19, 2018 19:48
UTF-8 Text Filter for BBEdit
# launch AppleScript to retrieve filename of file to
# be converted and store the result in `file_to_change`
file_to_change=$(/usr/bin/osascript << EOT
tell app "BBEdit"
set filePath1 to file of document 1
set filePath2 to POSIX path of filePath1
#!/usr/bin/env python
import os
import sys
import subprocess
if len(sys.argv) > 1:
files = []
for arg in sys.argv[1:]:
if os.path.exists(arg):
p = os.path.abspath(arg).replace('\\', '\\\\').replace('"', '\\"')
seamusdemora /
Created March 15, 2020 10:21 — forked from salcode/
Notes for bash scripting git commands
# Current branch - Determine current git branch, store in $currentbranch, and exit if not on a branch
if ! currentbranch=$(git symbolic-ref --short -q HEAD)
echo We are not currently on a branch.
exit 1
# Uncommited Changes - Exit script if there uncommited changes
if ! git diff-index --quiet HEAD --; then
echo "There are uncommited changes on this repository."
# Custom history configuration
# Run script using:
# chmod u+x
# sudo su
# ./
echo ">>> Starting"
echo ">>> Loading configuration into /etc/bash.bashrc"
echo "HISTTIMEFORMAT='%F %T '" >> /etc/bash.bashrc
echo 'HISTFILESIZE=-1' >> /etc/bash.bashrc
seamusdemora /
Created April 11, 2024 07:47 — forked from the-spyke/
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.