Working Ninja
2015-11-17T23:19:39
  1. Firmware not loading.
    dmesg | grep -i bluetooth
    
    bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0b05-17cb.hcd failed with error -2
  2. Download Windows driver from ASUS.
    http://dlcdnet.asus.com/pub/ASUS/wireless/USB-BT400/UT_USB_BT400_6516000.zip
  3. Extract and open Win32\bcbtums-win7x86-brcm.inf
  4. Find Product Name (BT400).
    %AsusBT400.DeviceDesc%=RAMUSB17CB,          USB\VID_0B05&PID_17CB       ; 20702 standalone
  5. Find section for "RAMUSB17CB".
    ;;;;;;;;;;;;;RAMUSB17CB;;;;;;;;;;;;;;;;;
     
    [RAMUSB17CB.CopyList]
    bcbtums.sys
    BCM20702A1_001.002.014.1315.1347.hex
     
    [RAMUSB17CB.NTX86]
    Include=bth.inf
    Needs=BthUsb.NT
    FeatureScore=F0
    CopyFiles=RAMUSB17CB.CopyList
     
    [RAMUSB17CB.NTX86.hw]
    AddReg=RAMUSB17CB.NTX86.hw.reg
     
    [RAMUSB17CB.NTX86.hw.reg]
    HKR,,LowerFilters, 0x00010000, "bcbtums"
    HKR,,%RAMPatchFileName%,0x00000, "BCM20702A1_001.002.014.1315.1347.hex"
    HKR,,%RemoteWakeEnabled%,0x00010001,1
    HKR,,%DeviceRemoteWakeSupported%,0x00010001,1
     
    [RAMUSB17CB.NTX86.Services]
    needs=BthUsb.NT.Services
    AddService=bcbtums,,BCBTUMS_Service_Inst, BTWSECFL_EventLog_Inst
  6. Note .hex file referenced: BCM20702A1_001.002.014.1315.1347.hex.
  7. Download hex2hcd.
    https://github.com/jessesung/hex2hcd/
  8. Convert hex to hcd.
    ./hex2hcd BCM20702A1_001.002.014.1315.1347.hex BCM20702A1-0b05-17cb.hcd
  9. Copy to location found via dmesg in Step 1.
    cp BCM20702A1-0b05-17cb.hcd /lib/firmware/brcm/
  10. Reboot (or modprobe -r btusb; modprobe btusb).

ht: http://askubuntu.com/questions/605075/how-to-use-a-bluetooth-headset-mic-in-ubuntu

2015-11-03T08:12:24

Not doing anything but your hard drive is screaming? iotop to the rescue.

iotop

In my case, updatedb.mlocate was the culprit.

2015-10-25T21:28:09
# systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

Monitor will still go into power save mode.

2015-10-24T11:43:09

Redshift sometimes stays enabled, setting the color temperature too low during the day. A quick fix is to set the color temperature from command line:

redshift -O 6000

 

2015-10-21T22:49:47

Every once and a while, I lose network connectivity to the point where my NFS share is unmounted and, when remounted, the Desktop fills up with everything in ~/.

The problem lies in the file ~/.config/user-dirs.dirs. It should be as follows (for my setup):

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

So, for example, XDG_DESKTOP_DIR="$HOME/Desktop" when remounted turns into XDG_DESKTOP_DIR="$HOME/", thus the problem. The correction is to replace with the above. I plan to write a script to check for the missing directories after $HOME/ and replace as necessary.

2015-10-14T10:22:24
SELECT count(email),email FROM auth_user GROUP BY email HAVING count(email) > 1;
2015-10-14T10:16:36

\dt - list tables

\l - list databases

\dn - list schemas

\x - toggle extended display

2015-10-14T08:12:31
$('#id').on('input', fuction(){
    var dInput = this.value;
    $('#output').text(dInput);
});
2015-10-13T07:38:08

This script will find (including subdirectories) and convert all m4a files to mp3.

find -name "*.m4a" -exec ~/m4atomp3 {} \;

m4atomp3:

#!/bin/bash
m4afile=$@
avconv -i "$m4afile" -ab 320k "${m4afile/.m4a/.mp3}"

Remember to chmod +x m4atomp3.

2015-10-12T20:20:36

Sometimes the remote is too far away to change the volume of music playing through the Raspberry Pi. Whilst at the terminal, alsamixer offers a great solution:

alsamixer