Skip to content

Instantly share code, notes, and snippets.

@AlexandrLucas
AlexandrLucas / AstroA20-Ubuntu.md
Last active July 23, 2025 16:19
Enabling Astro A20 on Ubuntu 20.04

Description

The Astro A20 headphones are NOT being registered as an output device on Ubuntu 20.04, even though the built-in mic is registered correctly as an input device.

Fix

Append the function below to your ~/.bashrc and then you can simply type in a20 in the terminal whenever you need to connect your A20 headset.
It checks to make sure the headset is plugged in and uses a regex to automatically detect the card number, which often changes. The device number on the other hand seems to be always "1" (at least for me). If you want to connect the headset at startup, simply copy the function body (what's inside the curly brackets) to ~/.profile.

# Astro A20 headphones
@supwr
supwr / niveis de log.txt
Last active September 4, 2017 18:16
Niveis de Log
=> Debug
=> Info (interação do usuário, hit de api)
=> Notice (eventos comuns, eventos relevantes)
=> Warning (eventos que fogem do comum, não sendo erros, mas relevantes ao sistema)
=> Error (erro em tempo de execução)
=> Critical (falha de serviços externos)
=> Alert (erros que precisam de ação corretiva imediata)
=> Emergency (sistema em estado inativo)
@kunicmarko20
kunicmarko20 / Article.php
Last active October 10, 2024 16:34
Symfony Second Level Cache
<?php
namespace AppBundle\Entity;
/**
* @package AppBundle\Entity
* @ORM\Entity()
* @ORM\Table()
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
@raphox
raphox / NfeController.php
Created December 20, 2016 12:19
Symfony 2 + NFePHP + Form + Controller
<?php
namespace Labone\Bundle\OrderBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
http://www.oreilly.com/data/free/files/2014-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/2015-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/Data_Analytics_in_Sports.pdf
http://www.oreilly.com/data/free/files/advancing-procurement-analytics.pdf
http://www.oreilly.com/data/free/files/ai-and-medicine.pdf
http://www.oreilly.com/data/free/files/analyzing-data-in-the-internet-of-things.pdf
http://www.oreilly.com/data/free/files/analyzing-the-analyzers.pdf
http://www.oreilly.com/data/free/files/architecting-data-lakes.pdf
http://www.oreilly.com/data/free/files/being-a-data-skeptic.pdf
http://www.oreilly.com/data/free/files/big-data-analytics-emerging-architecture.pdf
@odan
odan / xampp_php7_xdebug.md
Last active October 13, 2025 22:45
Installing Xdebug for XAMPP
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE