Skip to content

Instantly share code, notes, and snippets.

View jacobmoroni's full-sized avatar

Jacob M Olson jacobmoroni

View GitHub Profile
@jacobmoroni
jacobmoroni / fold_default_open.md
Created February 21, 2022 17:22
Markdown folded sections (default open and closed)

Markdown Folded Text (Default Open)

<details open>

  <summary>Click to collapse</summary>
  
  this one starts expanded because of the "open"
  
</details>
@jacobmoroni
jacobmoroni / audio_settings.md
Last active February 2, 2022 22:03
Keep internal speakers selected when plugged into dock/ crash course on udev rules

Setting up audio stuff for Ubuntu 20

I am trying to setup my computer to use default speaker and microphone when plugged into my dock because it doesnt have speakers and it drives me crazy to set it each time.

One simple solution is to edit the /etc/pulse/default.pa file and comment out the lines that make it automatically switch to whatever is plugged in. These are the lines to comment out (lines 36-38 for me)

.ifexists module-switch-on-connect.so
load-module module-switch-on-connect
@jacobmoroni
jacobmoroni / callbacks.md
Last active February 2, 2022 16:42
Component Callback Functions C++

Call a function in a parent or different child(component) of the parent from one of its children(component)

In the child class

class ChildClass {
public:
  void whateverFunction(int whatever_args) {
    // Set the data that will be passed into the callback
    DataType data = "whatever"; 
 if (event_handler_) {