Skip to content

Instantly share code, notes, and snippets.

View simonesestito's full-sized avatar
🇮🇹

Simone Sestito simonesestito

🇮🇹
View GitHub Profile
@simonesestito
simonesestito / use_dual_monitor_speakers.sh
Created January 19, 2024 08:37
PulseAudio: use multiple speakers
#!/bin/bash
# TODO: Update this strings with the actual values for your speakers
# TODO: Remember to also adjust the volumes to balance them (depending on their power and their distance from your location)
SPEAKER_1_NAME=alsa_output.pci-0000_03_00.1.hdmi-stereo
SPEAKER_1_VOLUME=80%
SPEAKER_2_NAME=alsa_output.pci-0000_03_00.6.analog-stereo
SPEAKER_2_VOLUME=100%
# Initially, remove previous state
@simonesestito
simonesestito / README.md
Last active October 3, 2024 17:17
eduroam connection fix

Error

journalctl --boot --unit wpa_supplicant.service --follow

wpa_supplicant[888]: SSL: SSL3 alert: write (local SSL3 detected an error):fatal:protocol version

wpa_supplicant[888]: OpenSSL: openssl_handshake - SSL_connect error:0A000102:SSL routines::unsupported protocol

That may indicate that the network you're trying to connect to, requires some very old protocols.

@simonesestito
simonesestito / main.go
Last active January 7, 2023 09:51
CFG derivation tester
package main
import (
"fmt"
"strings"
)
func main() {
// ! Edit grammar
cfg := NewGrammar('S', map[byte]Rule{
@RebelLion420
RebelLion420 / TermuxArchSetup2024.md
Last active October 24, 2024 19:56
How to set up Arch Linux in Termux on Android

NOTICE: This will take up about 3 GB of space on your device, before syncing any repos or projects.

Install Termux from the Play Store and launch it

Once it finishes unpacking:

pkg update

pkg upgrade -y

@diffficult
diffficult / installing_virt_manager.md
Last active November 13, 2024 20:51
Easy instructions to get virt-manager qemuv/kvm running on Arch

Easy instructions to get QEMU/KVM and virt-manager up and running on Arch

  1. Make sure your cpu support kvm with below command:

     grep -E "(vmx|svm)" --color=always /proc/cpuinfo
    
  2. Make sure BIOS have enable “Virtualization Technology”.

  3. User access to /dev/kvm so add your account into kvm(78) group:

@ibrahimsn98
ibrahimsn98 / android-get-apps-adaptive-icons-circle
Created January 27, 2018 21:04
Android - Get aplication's adaptive icons in circle form
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.drawable.AdaptiveIconDrawable;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.os.Build;
@nishantmodak
nishantmodak / nginx.conf.default
Last active September 9, 2024 14:30
Default Nginx Conf
#user nobody;
#Defines which Linux system user will own and run the Nginx server
worker_processes 1;
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
#error_log logs/error.log; #error_log logs/error.log notice;
#Specifies the file where server logs.
@burgalon
burgalon / AccountAuthenticator.java
Last active July 15, 2023 08:29
Implementing OAuth2 with AccountManager, Retrofit and Dagger
public class AccountAuthenticator extends AbstractAccountAuthenticator {
private final Context context;
@Inject @ClientId String clientId;
@Inject @ClientSecret String clientSecret;
@Inject ApiService apiService;
public AccountAuthenticator(Context context) {
super(context);