Skip to content

Instantly share code, notes, and snippets.

View angelotrivelli's full-sized avatar

Angelo Trivelli angelotrivelli

View GitHub Profile
@JamesDawson
JamesDawson / setup-pyenv-poetry-windows.ps1
Last active April 23, 2024 07:34
Setup python, pyenv-win and poetry on Windows
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string] $PythonVersion
)
$ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
Set-StrictMode -Version Latest
@moritzmhmk
moritzmhmk / rpi_camera_v4l2_ffmpeg.md
Last active April 16, 2024 19:20
using raspberry pi camera with ffmpeg (hardware accelerated)

Using Raspberry Pi Camera with ffmpeg

Capturing video from the rpi camera with ffmpeg can vary from less than 5% to 100% of the CPU (rpi zero) depending on ffmpeg using the hardware acceleration or not.

On many github issues one finds the suggestion of using h264_omx codec to use the gpu - but it does not ship with the default ffmpeg on Raspbian.

Instead I found that one can use the v4l2 driver provided by raspbian to get hardware accelerated h264 output. Also setting the video size will save one from using a (cpu) scale filter.

ffmpeg

capture h264 video from rpi camera

@leonardofed
leonardofed / README.md
Last active May 3, 2024 01:24
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@m-ou-se
m-ou-se / replace-debian-with-arch.txt
Last active October 22, 2023 12:16
Instructions to replace a live Debian installation with Arch
# Download latest archlinux bootstrap package, see https://www.archlinux.org/download/
wget 'ftp://ftp.nluug.nl/pub/os/Linux/distr/archlinux/iso/latest/archlinux-bootstrap-*-x86_64.tar.gz'
# Make sure you'll have enough entropy for pacman-key later.
apt-get install haveged
# Install the arch bootstrap image in a tmpfs.
mount -t tmpfs none /mnt
cd /mnt
tar xvf ~/archlinux-bootstrap-*-x86_64.tar.gz --strip-components=1
@DavidWittman
DavidWittman / supermicro-ipmi-mac-address.md
Last active August 17, 2023 08:05
Pull the LAN1/eth0 MAC address from SuperMicro IPMI

You can find the MAC address for LAN1/eth0 (not the BMC MAC) via the SuperMicro IPMI interface by running the following command:

$ ipmitool -U $IPMI_USER -P $IPMI_PASS -H $IPMI_HOST raw 0x30 0x21 | tail -c 18

The eth0 MAC address will be output in this format:

00 25 90 f0 be ef
@tmbdev
tmbdev / usb0
Created June 13, 2013 10:00
Use expect to connect to a serial port (e.g., for Arduino)
#!/usr/bin/expect -f
# device
set modem /dev/ttyUSB0
# keep it open
exec sh -c "sleep 3 < $modem" &
# serial port parameters
exec stty -F $modem 9600 raw -clocal -echo -istrip -hup