Skip to content

Instantly share code, notes, and snippets.

View steveoriol's full-sized avatar

Stève Oriol steveoriol

View GitHub Profile
@savegame
savegame / pulse_sreaming.md
Last active May 23, 2024 04:57
PulseAudio / PipeWire streaming audio from Client to remote PulseAudio / PipeWire Server

We have Server machine, this computer with Headphones, and we have Client computer, this is remote PC with music =) On Server we should first open port for listening connections from Client :

# on ubuntu 
sudo ufw allow from <Client_IP> to any port 4656 proto tcp
# on fedora ( with firewalld ) 
sudo firewall-ctl --add-port 4656/tcp

note: port 4656 just for sample. you can use any port you want
than on Server, from current user add listening for connections

@opi
opi / BlogAuthorComputed.php
Created October 21, 2021 12:22
Computed field example for Drupal 8/9
<?php
// in MY_MODULE/src/ComputedField/BlogAuthorComputed.php
namespace Drupal\MY_MODULE\ComputedField;
use Drupal\Core\Field\EntityReferenceFieldItemList;
use Drupal\Core\TypedData\ComputedItemListTrait;
class BlogAuthorComputed extends EntityReferenceFieldItemList {
@opi
opi / my_module.php
Last active November 11, 2021 14:46
Extra field example for drupal 8/9
<?php
/**
* Implements hook_entity_extra_field_info().
*/
function MYMODULE_entity_extra_field_info() {
$extra = [];
foreach (NodeType::loadMultiple() as $bundle) {
@pylover
pylover / a2dp.py
Last active May 27, 2024 21:51
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3
"""Fixing bluetooth stereo headphone/headset problem in debian distros.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
Licence: Freeware