Skip to content

Instantly share code, notes, and snippets.

@kparaju
kparaju / de.sh
Created May 18, 2012 01:22
Desktop Environment Switcher
#!/bin/bash
# Gives the user the ability to switch desktop enviroments on the fly
# Copyright Kshitij Parajuli (kshitijparajuli@gmail.com).
# Licensed under a Creative Commons Attribution 3.0 Unported License.
if [ $1 = "gnome" ]
then
gnome-shell --replace &
// my little html string builder
buildHTML = function(tag, html, attrs) {
// you can skip html param
if (typeof(html) != 'string') {
attrs = html;
html = null;
}
var h = '<' + tag;
for (attr in attrs) {
if(attrs[attr] === false) continue;
# Derived from https://www.reddit.com/r/osx/comments/5q2kbl/fix_macos_sierra_bluetooth_stutter/dduj6wa/
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 80
sudo killall bluetoothaudiod