Skip to content

Instantly share code, notes, and snippets.

@petewarden
petewarden / bashrc.sh
Created January 31, 2022 23:41
Bash history settings to tweak for infinite history, instant appending of commands, and shared history across multiple terminals.
# By Pete Warden, @petewarden
# To use this, open ~/.bashrc in your editor of choice,
# and place these settings at the end.
# Based on https://unix.stackexchange.com/a/48113 and
# https://blog.sanctum.geek.nz/better-bash-history/
# Ignore both duplicate commands, and those that start with a space.
HISTCONTROL=ignoreboth
# Append to the history file, don't overwrite it.
@the-spyke
the-spyke / pipewire.md
Last active July 14, 2024 13:08
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.

@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Last active July 18, 2024 11:27 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6. Forked from @fabianoriccardi

Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@Tynach
Tynach / telegram-gif.sh
Last active July 3, 2023 10:33
Uses FFMPEG to convert any file FFMPEG understands into a .mp4 file that Telegram will consider as a 'gif', at higher quality than Telegram converts gifs to itself.
#!/bin/bash
# Settings
outfolder="converted"
codec="libx264"
maxres="448"
#filter="crop=floor(in_w/2)*2:floor(in_h/2)*2:0:0:exact=1,colorspace=bt601-6-625:range=pc:irange=tv:iall=bt601-6-625:format=yuv444p12,zscale=rin=full:tin=601:t=linear,scale=if(gt(iw\,ih)\,min($maxres\,floor((iw+1)/2)*2)\,-2):if(gt(iw\,ih)\,-2\,min($maxres\,floor((ih+1)/2)*2)),zscale=rin=full:r=limited:tin=linear:t=601"
filter="scale=if(gt(iw\,ih)\,min($maxres\,floor((iw+1)/2)*2)\,-2):if(gt(iw\,ih)\,-2\,min($maxres\,floor((ih+1)/2)*2)):out_color_matrix=bt601:out_range=tv:flags=accurate_rnd+full_chroma_inp+full_chroma_int+bicublin"
preset="veryslow"
profile="high"