Skip to content

Instantly share code, notes, and snippets.

View cyruzin's full-sized avatar
🍺
If you're stuck in the code, just have a beer

Cyro cyruzin

🍺
If you're stuck in the code, just have a beer
View GitHub Profile
@the-spyke
the-spyke / pipewire.md
Last active July 29, 2024 04:46
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@GetVladimir
GetVladimir / Force-RGB-Color-on-M1-Mac.md
Last active July 18, 2024 14:58
Force RGB Color on M1 Mac

Force RGB Color on M1 Mac

How to Force RGB Color Output instead of YPbPr on your M1 Apple Silicon Mac for an External Monitor.

This step-by-step video tutorial will guide you through the procedure of forcing RGB color output on your M1 Mac.

Force RGB Color on M1 Mac

Here is the direct link to the video tutorial: https://www.youtube.com/watch?v=Z1EqH3fd0V4

The video also has Closed Captions (Subtitles) that you can enable, to make it easier to follow if needed.

@Kaapiii
Kaapiii / Instruction.md
Last active May 10, 2024 02:39
Ubuntu 20.04/20.10 Install TLP for Lenovo ThinkPad

Installation Instruction for TLP for Lenovo ThinkPads

Install & Start TLP & Check System Status

sudo apt install tlp tlp-rdw
sudo tlp start
sudo tlp-stat -s

Check status of battery features with

@mr4torr
mr4torr / netvirtua_netcombo-config-ssh.md
Last active December 8, 2022 18:38
NET não libera a porta 22 e impede de acessar por ssh github/bitbucket

Usar ssh do github e do bitbucket com wifi do netcombo /netvirtua

A NET só libera o uso de qualquer porta, como a porta 22 de ssh, para pessoa jurídica em seus novos planos (desde 2016).

Para conseguir usar o github ou bitbucket por ssh com plano de internet da NET para pessoa física, é necessário:

Criar o arquivo ~/.ssh/config e adicionar:

Host github.com
@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
@nilo
nilo / gist:c2a31a0f9f29c88145ca
Created July 30, 2015 15:42
Using cedilha - ArchLinux Cinnamon
Author: Nilo Dantas - n1lo
Based on: https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/518056 - helio-valente post
How to use Cedilha on US Keyboard on ArchLinux
1) Put: English(US, internacional with dead Keys) on your system keyboard layout.
2) Editing the files:
sudo vim /usr/lib/gtk-3.0/3.0.0/immodules.cache
@dgrigg
dgrigg / json_exception_helper.php
Created November 22, 2013 21:14
A CodeIgniter helper function for returning JSON errors messages to AJAX calls instead of standard HTML error page. Use the helper instead of having to override the core Exception class.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
function show_json_error($message, $status_code = 500, $status_message = '')
{
header('Cache-Control: no-cache, must-revalidate');
header('Content-type: application/json');
set_status_header($status_code, $status_message);
echo json_encode(