Skip to content

Instantly share code, notes, and snippets.

View GinoAvanzini's full-sized avatar
😄

Gino Avanzini GinoAvanzini

😄
View GitHub Profile
@GinoAvanzini
GinoAvanzini / bluetooth.md
Created November 22, 2021 00:36
Bluetooth for Broadcom devices on Arch Linux

Broadcom bluetooth devices on Arch Linux

First read thoroughly the Arch Wiki entry on bluetooth Verify that your Broadcom bluetooth device is recognized with lsusb. You should see something like:

...
Bus 002 Device 005: ID xxxx:xxxx Lite-On Technology Corp. Broadcom BCM43142A0 Bluetooth Device
...
@GinoAvanzini
GinoAvanzini / cleanup_cache.hook
Created April 6, 2020 14:01
Pacman hook for cache cleanup. It goes on /etc/pacman.d/hooks Extracted from the Arch wiki https://bbs.archlinux.org/viewtopic.php?pid=1694743#p1694743
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache...
When = PostTransaction
@GinoAvanzini
GinoAvanzini / programmer_nano
Created March 20, 2020 19:22
Command to upload hex file to Arduino Nano
#!/bin/bash
avrdude -c arduino -p atmega328p -P /dev/ttyUSB0 -b 57600 -U flash:w:$1:i
@GinoAvanzini
GinoAvanzini / Makefile
Last active May 29, 2020 19:07 — forked from mcous/Makefile
Simple AVR Makefile template
# Simple AVR Makefile
#
# written by michael cousins (http://github.com/mcous)
# released to the public domain
# edited by Gino Avanzini (http://github.com/GinoAvanzini)
# tailored to atmega328p with an arduino programmer
# Makefile
@GinoAvanzini
GinoAvanzini / python_venv.md
Last active February 27, 2024 18:24
Setting up a simple Python virtual environment using venv

Python virtual environments using venv

Virtual environments are a useful way of separating dependencies and establishing a working environment for Python projects. The most common way of achieving this is through the use of virtualenv or pipenv. But since Python 3.3, a subset of virtualenv has been integrated into the standard library under the venv module. Though not as featureful as the former two, venv is a simple way of getting a functional virtual environment setup.

This gist was inspired by Corey Schafer's video on venv.

The commands are intended to be used on any Arch-based Linux distribution. For others distros, python3 and pip3 might be the way to go.

Using venv