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.
| # Copyright (c) 2017 Ansible Project | |
| # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | |
| from __future__ import absolute_import, division, print_function | |
| import os | |
| from collections import MutableMapping | |
| from yaml.nodes import MappingNode |
The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
| Add the following in .zshrc: | |
| ... | |
| plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl) | |
| ... | |
| ### Fix slowness of pastes with zsh-syntax-highlighting.zsh | |
| pasteinit() { | |
| OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} | |
| zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? |
| #!/bin/bash | |
| # Inspired by https://github.com/oogali/ebs-automatic-nvme-mapping | |
| # Thanks Oogali! | |
| # Tested on Ubuntu 16.04 | |
| # To be used with the below udev rule (/etc/udev/rules.d/99-ebs-nvme.rules) | |
| # SUBSYSTEM=="block", KERNEL=="nvme[0-9]*n[0-9]*", ATTRS{model}=="Amazon Elastic Block Store", PROGRAM+="/usr/local/sbin/nvme-mapping.sh /dev/%k" SYMLINK+="%c" | |
| if [[ -x /usr/sbin/nvme ]] && [[ -b ${1} ]]; then | |
| # capture 32 bytes at an offset of 3072 bytes from the raw-binary data | |
| # not all block devices are extracted with /dev/ prefix |
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
| #!/bin/bash -e | |
| TMPDIR="$(mktemp -d)" | |
| function cleanup() { | |
| rm -rf "$TMPDIR" | |
| } | |
| trap cleanup EXIT |
I recently happened upon a very interesting implementation of popen() (different API, same idea) called popen-noshell using clone(2), and so I opened an issue requesting use of vfork(2) or posix_spawn() for portability. It turns out that on Linux there's an important advantage to using clone(2). I think I should capture the things I wrote there in a better place. A gist, a blog, whatever.
This is not a paper. I assume reader familiarity with
fork()in particular and Unix in general, though, of course, I link to relevant wiki pages, so if the unfamiliar reader is willing to go down the rabbit hole, they should be able to come ou
Some notes about:
- Explaining why current day Linux memory swap thrashing still happens (as of 2016).
- Mitigating "stop the world" type thrashing issues on a Linux workstation when it's under high memory pressure and where responsiveness is more important than process completion.
- Prioritizing and limiting memory use.
- Older ulimit versus newer CGroup options.
These notes assume some basic background knowledge about memory management, ulimits and cgroups.
