Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Uithoven peteruithoven

View GitHub Profile
@pylover
pylover / a2dp.py
Last active Nov 24, 2020
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
View a2dp.py
#! /usr/bin/env python3.5
"""
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
@gaearon
gaearon / slim-redux.js
Last active Nov 14, 2020
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
View slim-redux.js
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@jeffmo
jeffmo / gist:054df782c05639da2adb
Last active Nov 24, 2020
ES Class Property Declarations
View gist:054df782c05639da2adb
You can’t perform that action at this time.