Skip to content

Instantly share code, notes, and snippets.

View AlexRuiz7's full-sized avatar

Álex Ruiz Becerra AlexRuiz7

View GitHub Profile
@peters
peters / Sony WH-1000XM4.md
Last active May 9, 2025 06:00
Connecting Sony WH-1000XM4 to Ubuntu 22.04 (Jammy)

Connecting Sony WH-1000XM4 to Ubuntu 22.04 (Jammy)

This guide will help you connect your Sony WH-1000XM4 headset to Ubuntu 22.04 using Bluetooth. Once connected, you'll be able to listen to music and use the microphone on apps like Microsoft Teams.

1. Connect to Bluetooth Headset

Steps:

  1. Open a terminal and launch bluetoothctl:
@PanagiotisPtr
PanagiotisPtr / json_lib.cpp
Last active April 15, 2021 10:52
A very basic JSON Serialiser and Deserialiser in C++
#ifndef JSONLIB_H
#define JSONLIB_H
#include <iostream>
#include <cctype>
#include <unordered_map>
#include <sstream>
#include <memory>
#include <type_traits>
#include <iterator>
@DahlitzFlorian
DahlitzFlorian / Dockerfile
Last active March 31, 2022 10:56
Run Python application as non-root in Docker - requirements.txt
FROM python:3.7.2-alpine
RUN pip install --upgrade pip
RUN adduser -D worker
USER worker
WORKDIR /home/worker
COPY --chown=worker:worker requirements.txt requirements.txt
RUN pip install --user -r requirements.txt
@PanagiotisPtr
PanagiotisPtr / Audio.cpp
Last active February 24, 2025 15:55
WAV File Reader / Writer C++
#pragma once
#include "Audio.h"
Audio::Audio(std::string str) {
if (str.substr(str.size() - 4) != ".wav")
throw std::invalid_argument("Can only read WAV files!");
load_wav(str);
}
@yqritc
yqritc / gist:ccca77dc42f2364777e1
Last active January 25, 2025 17:43
Equal column spacing for Android RecyclerView GridLayoutManager by using custom ItemDecoration

ItemOffsetDecoration

public class ItemOffsetDecoration extends RecyclerView.ItemDecoration {

    private int mItemOffset;

    public ItemOffsetDecoration(int itemOffset) {
        mItemOffset = itemOffset;
    }
@rob-murray
rob-murray / add_intellij_launcer
Last active May 21, 2025 07:23
Add Intellij launcher shortcut and icon for ubuntu
// create file:
sudo vim /usr/share/applications/intellij.desktop
// add the following
[Desktop Entry]
Version=13.0
Type=Application
Terminal=false
Icon[en_US]=/home/rob/.intellij-13/bin/idea.png
Name[en_US]=IntelliJ