Skip to content

Instantly share code, notes, and snippets.

View brianjriddle's full-sized avatar

Brian Riddle brianjriddle

View GitHub Profile
@maxrp
maxrp / bluetooth_speaker_freebsd13.md
Last active August 3, 2024 13:44
Notes on getting audio out of my FreeBSD 13.0-CURRENT laptop over bluetooth to a speaker.

Bluetooth Audio from a Lenovo X220 running FreeBSD 13.0-CURRENT

2020-04-05

The FreeBSD Handbook Bluetooth chapter is, as usual, great but I needed to do a bit more (or perhaps in a more specific way) to get audio from the Broadcom Bluetooth chip in my Lenovo X220 to the Soundblaster Roar SR20 that lives in my kitchen.

/boot/loader.conf

Load the user character device driver cuse and all the netgraph bluetooth modules, this is better done earlier to avoid the annoying (and possibly significant) WARNING: attempt to domain_add(xyz) after domainfinalize() errors at startup.

cuse_load="YES"

ng_ubt_load="YES" # for most USB bluetooth, for others, refer to the handbook

@WildDogOne
WildDogOne / gist:425e7ba7791593f564da
Last active December 28, 2016 08:24
Install PBIS on Ubuntu 15.04
1. download powerbroker frome here http://download1.beyondtrust.com/Technical-Support/Downloads/PowerBroker-Identity-Services-Open-Edition/?Pass=True
2. sudo chmod a+x {filename}
sudo ./pibsfilename.sh
3. sudo domainjoin-cli join --disable ssh contoso.local administrator@contoso.local
4. sudo vim /etc/pam.d/common-session
add: "session [success=ok default=ignore] pam_lsass.so"
@xaviershay
xaviershay / build_frontend.sh
Last active December 24, 2015 20:49
SASS + Coffee + Concatenation in prod
#!/bin/bash
set -exo pipefail
BUILD_ENV=$1
if [ `uname` == 'Darwin' ]; then
OSX=1
JSCOMPRESSOR="yuicompressor --type js"
else
OSX=
@richhickey
richhickey / thread.clj
Created October 13, 2012 17:43
new thread macros draft
(defmacro test->
"Takes an expression and a set of test/form pairs. Threads expr (via ->)
through each form for which the corresponding test expression (not threaded) is true."
[expr
& clauses]
(assert (even? (count clauses)))
(let [g (gensym)
pstep (fn [[test step]] `(if ~test (-> ~g ~step) ~g))]
`(let [~g ~expr
~@(interleave (repeat g) (map pstep (partition 2 clauses)))]
@ghostganz
ghostganz / gist:1589361
Created January 10, 2012 14:33
Widening a PNG sprite on three places
require 'chunky_png'
original = ChunkyPNG::Image.from_file "original.png"
target = ChunkyPNG::Image.new(original.width + (355 * 3), original.height)
break_columns = [100, 310 + 100, 620 + 100]
target_x = 0
(0...original.width).each do |x|