If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
#!/usr/bin/env bash | |
SLEEP_DURATION=${SLEEP_DURATION:=1} # default to 1 second, use to speed up tests | |
progress-bar() { | |
local duration | |
local columns | |
local space_available | |
local fit_to_screen | |
local space_reserved |
This document aims to provide an easy way encode video optimized for playback in mobile devices that use the Android or the iOS operating systems.
libx264
is used for (single or two-pass) video encoding and libfdk_aac
for audio encoding.
ffmpeg
, libx264
and libfdk_aac
settings are optimized for playback quality and compatibility on Android and iOS.
There is extensive documentation and references for each of the settings used and contributions are very welcome :)
See how a minor change to your commit message style can make a difference.
Tip
Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs
var canvas = document.createElement('canvas'); | |
var gl; | |
var debugInfo; | |
var vendor; | |
var renderer; | |
try { | |
gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); | |
} catch (e) { | |
} |
import is from './is-util'; | |
/** | |
* Either Monad class (from Functional Programming in JavaScript) | |
*/ | |
class Either { | |
constructor(value) { | |
this._value = value; | |
} | |
get value () { |
We are planning on building a Node.js service. Here's our evaluation of the current ORM landscape:
Last updated: May 2 2016
- Objection.js
- http://vincit.github.io/objection.js/#introduction
- Bad: API is Promise based and bulky. This means people can forget to have an error handler due to not being error first
- Good: Uses JSON schema for validation; this means content should be relatively reusable between server/browser
- http://vincit.github.io/objection.js/#validation
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
/* bling.js */ | |
window.$ = document.querySelector.bind(document); | |
window.$$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
NodeList.prototype.__proto__ = Array.prototype; | |
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |