Skip to content

Instantly share code, notes, and snippets.

@cbecker
cbecker / pipewire-debian11.md
Last active December 9, 2022 16:04
Pipewire on debian 11. Soundcore Liberty 3 Pro microphone/headset working

Instructions to replace PulseAudio with PipeWire on debian 11.

sudo apt install -t backports pipewire pipewire-alsa pipewire-audio-client-libraries 

Populate config files in /etc/pipewire/media-session.d:

# Set up basic config files

Keybase proof

I hereby claim:

  • I am cbecker on github.
  • I am carlosbecker (https://keybase.io/carlosbecker) on keybase.
  • I have a public key ASBYSTfX403lmumVbGV3NUAzaZbTNTIZtWWOUye0Wnc5ggo

To claim this, I am signing this object:

@cbecker
cbecker / main.cpp
Created February 24, 2020 17:37
sigslot example w/shared_ptr
#include <thread>
#include <atomic>
#include <cstdio>
#include <chrono>
#include <memory>
#include <sigslot/signal.hpp>
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
@cbecker
cbecker / Qt Creator
Created October 19, 2017 15:29
Dev computer set up
Syntax theme .xml, copy to /usr/share/qtcreator/styles
@cbecker
cbecker / SomeClass.cpp
Created April 7, 2017 11:56
Pimpl idea
#include "MyClass.h"
class MyClass::Impl
{
// etc..
};
MyClass::MyClass()
: m_pimpl(new Impl())
@cbecker
cbecker / git.md
Last active December 9, 2021 11:26
Git related

Amazing tutorial and resource

http://learngitbranching.js.org/

Search content on all commits

git grep -p '<whatever>' $(git rev-list --all)

Get file from branch B2 into branch B1

git checkout B1
@cbecker
cbecker / c++.md
Last active January 13, 2017 08:30
Languages ref

This contains useful reminders for me from C++11.

Class-related

abstract classes

Read more here, but basically

virtual void f() = 0; // pure virtual
@cbecker
cbecker / main.cpp
Last active February 7, 2024 03:04
lightGBM C++ example
#include <LightGBM/config.h>
#include <LightGBM/dataset_loader.h>
#include <LightGBM/boosting.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/metric.h>
#include <LightGBM/utils/common.h>
#include <iostream>
#include <random>
#include <algorithm>

layers.Conv2DLayer

Stride is equivalent to convolution + sub-sampling, in that order.

layers.TransposedConv2DLayer

Stride places zeroes between elements, then convolves with desired filter. I would recommend using crop='same'