Skip to content

Instantly share code, notes, and snippets.

@donthorp
donthorp / gist:6040686
Created July 19, 2013 16:58
And that's how the fight started
My wife and I were watching Who Wants To Be A Millionaire while we were in bed.
I turned to her and said, 'Do you want to have Sex?'
'No,' she answered.
I then said, 'Is that your final answer?'
... She didn't even look at me this time, simply saying, 'Yes..'
So I said, "Then I'd like to phone a friend."
And that's when the fight started...
Verifying that +donthorp is my blockchain ID. https://onename.com/donthorp
@donthorp
donthorp / hdmi-audio
Created October 30, 2021 15:20
Move Audio to HDMI on Pop OS
#! /usr/bin/env bash
# pactl set-default-sink \$(pactl list short sinks | grep hdmi-stereo | cut -f 1)
cat /etc/pulse/default.pa | grep "load-module module-stream-restore restore_device=false" > /dev/null
if [ $? -ne 0 ]
then
echo
echo "You may need to edit /etc/pulse/default.pa and add change:"
@donthorp
donthorp / hdmi-audio
Created November 3, 2021 22:43
Babashka script for telling Pop OS to select hdmi as the default sink
#! /usr/bin/env bb
(ns hdmi-audio
(:require
[clojure.java.shell :as shell :refer [sh]]
[clojure.string :as str]
)
)
(def restore-device-cmd "cat /etc/pulse/default.pa | grep \"load-module module-stream-restore restore_device=false\" > /dev/null")
@donthorp
donthorp / update-babashka.clj
Last active December 1, 2021 19:00
Script for updating Babashka on Pop OS (Ubuntu) using Babashka
#! /usr/bin/env bb
;; Simple script for updating babashka to latest
;;
;; Author: Don Thorp
;; Created: 1 Dec 2021
;;
;; Source: https://github.com/babashka/babashka#installation
;;
;; $ curl -sLO https://raw.githubusercontent.com/babashka/babashka/master/install