Skip to content

Instantly share code, notes, and snippets.

View cdennig's full-sized avatar
🏠
Working from home...

Christian Dennig cdennig

🏠
Working from home...
View GitHub Profile
@ChriRas
ChriRas / readme.md
Last active November 25, 2023 19:55
Set up default audio device on Ubuntu 20.04 LTS

Problem

I have a notebook connected to a port replicator. I want to use the build-in speakers and microfone and not the external ones. If I boot my notebook in my port replicator Ubuntu changes the devices to external.

Solution

  1. Find your internal speaker
pactl list short sinks
@briancavalier
briancavalier / simple-promise-retry.js
Created February 24, 2011 18:35
A few general patterns for retries using promises
function keepTrying(otherArgs, promise) {
promise = promise||new Promise();
// try doing the important thing
if(success) {
promise.resolve(result);
} else {
setTimeout(function() {
keepTrying(otherArgs, promise);