Skip to content

Instantly share code, notes, and snippets.

View yosoufe's full-sized avatar
😄

Yousof yosoufe

😄
View GitHub Profile
@yosoufe
yosoufe / Freebuds_3_Ubuntu.md
Last active January 28, 2024 08:49
Increase the volume of Freebuds 3 on Ubuntu 18.04

Disclaimer

This is documentation for myself in hope of helping others. I do not accept any responsibility. Follow the instruction at your own risk. I tested it with Ubuntu 18.04 and it worked. This was also a practice for myself to automate something in Linux.

Solving Freebuds 3 volume problem on Linux

My freebuds 3 had a very low volume on Ubuntu 18.04 until I saw this answer. So running the following command 4 times resolved the issue

dbus-send --print-reply --system --dest=org.bluez /org/bluez/hci0/dev_<mac_address_of_headphones> org.bluez.MediaControl1.VolumeUp

Just note that the mac address should be seperated with _ underscore rather than : which you may find in the bluetooth settings.

@yosoufe
yosoufe / install_gcc_9.3.0.md
Last active July 26, 2022 14:19
Compile and install gcc-9.3.0
@yosoufe
yosoufe / PulseAudioTutorial.md
Last active March 7, 2020 21:48
Commands needed to manage the pulseAudio
# list all the devices 
aplay -l

it generates such an output for me which is missing the bluetooth devices

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC1220 Analog [ALC1220 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
@yosoufe
yosoufe / notebook_cell.py
Last active October 27, 2019 08:16
Update Matplotlib frame by frame in jupyter notebook for multiple lines
from time import sleep
%matplotlib notebook
x = []
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.autoscale()
num_agents = 5
@yosoufe
yosoufe / MeArmMicroBit.py
Created May 20, 2019 06:14
Code of MeArmMicroBit to read the Serial port and Drive the servos
# Add your Python code here. E.g.
from microbit import *
import time
###### Initialization of the hardware ######
# Turn off display to use display pins as GPIO
display.off()
# initialize the pins to control the Servos
@yosoufe
yosoufe / vscode debug.md
Last active August 31, 2019 01:40
Debug EKF Project on ubuntu machine with Visual Studio Code (VScode)

Youtube Link: https://youtu.be/ztRcKWe66sE

Clone the project if you do not have the folder project on your machine and make a build directory inside of it which all the compiled and executable files will be inside of it.

cd <your project folder>
mkdir build 

VS Code C/C++ Setup Tutorial

@yosoufe
yosoufe / follower.world
Created September 10, 2018 23:17
The world file
<sdf version='1.6'>
<world name='default'>
<light name='sun' type='directional'>
<cast_shadows>1</cast_shadows>
<pose frame=''>0 0 10 0 -0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
@yosoufe
yosoufe / TheGame.java
Last active May 8, 2016 12:46
Android App for the course "BEGIN PROGRAMMING". When the ball hits the smiley, it becomes sad smiley and after 3 seconds it becomes again a happy smiley.
package uk.ac.reading.sis05kol.mooc;
//Other parts of the android libraries that we use
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
public class TheGame extends GameThread{
//Will store the image of a ball