Skip to content

Instantly share code, notes, and snippets.

@geekuillaume
geekuillaume / esphome-lilygot5.yaml
Created January 5, 2022 21:19
Configuration for ESPHome + LilyGo T5 4.7"
esphome:
name: lilygo-t5
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
@wuhanstudio
wuhanstudio / qemu_armbian.sh
Last active May 13, 2025 16:12
Armbian on QEMU
# Install QEMU-6.1.0
wget https://download.qemu.org/qemu-6.1.0.tar.xz
tar xvJf qemu-6.1.0.tar.xz
cd qemu-6.1.0
./configure
make
sudo make install
# Download Armbian (Ubuntu Focal 20.04) for OrangePi PC
wget https://mirrors.netix.net/armbian/dl/orangepipc/archive/Armbian_21.08.1_Orangepipc_focal_current_5.10.60.img.xz
@antiagainst
antiagainst / adreno-perfcounter.c
Last active May 23, 2024 11:12
Adreno Perf Counter Queries
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#define ADRENO_IOC_TYPE 0x09
#define ADRENO_PERFCOUNTER_GROUP_SP 0xA
@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Last active July 6, 2025 20:19 — 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
@akaegi
akaegi / appcenter-post-build.sh
Last active December 7, 2021 14:11
Publish Android app bundle to Google App Center internal track
if [[ -z "$APPCENTER_PLAY_STORE_PUBLISH_TO_INTERNAL_TRACK" ]]; then
echo "Define environment variable APPCENTER_PLAY_STORE_PUBLISH_TO_INTERNAL_TRACK to run this post-build script."
exit 0
fi
PACKAGE_NAME=com.aa.xfspike
echo "Installing required Python packages"
pip3 install httplib2 google-api-python-client oauth2client
@probonopd
probonopd / Wayland.md
Last active July 13, 2025 02:21
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

image

Source: https://x.com/LundukeJournal/status/1940441670098809093

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

@sorny
sorny / x11_forwarding_macos_docker.md
Last active July 10, 2025 12:58
X11 forwarding with macOS and Docker

X11 forwarding on macOS and docker

A quick guide on how to setup X11 forwarding on macOS when using docker containers requiring a DISPLAY. Works on both Intel and M1 macs!

This guide was tested on:

  • macOS Catalina 10.15.4
  • docker desktop 2.2.0.5 (43884) - stable release
  • XQuartz 2.7.11 (xorg-server 1.18.4)
  • Macbook Pro (Intel)
WITH FIRST_ACTION AS (
SELECT
TIMESTAMP_TRUNC(TIMESTAMP_MICROS(event_timestamp), DAY) as DATE,
HLL_COUNT.INIT(user_id) as USER_ID_SET
FROM `<dataset>.<project_id>.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20200201' AND '20200221' AND event_name = 'session_start'
GROUP BY 1
), RETURNING_ACTION AS (
-- Source: https://t.me/BigQuery
-- Сalculation example bracket-dependent return retention (https://applift.com/blog/user-retention)
-- weekly (1 week = day2-8, 2 week = day9-15 ...)
WITH download AS (
SELECT
user_pseudo_id, app_info.version,
EXTRACT (DATE FROM (SELECT TIMESTAMP_MICROS(event_timestamp))) AS day_0
FROM `your_project.your_table.events_*`
@sbrissenden
sbrissenden / retention.sql
Last active May 31, 2022 00:51
[BigQuery + Google Analytics for Firebase] Daily N-Day User Retention of September 1 Cohort
#standardSQL
####################################################################
# PART 1: Cohort of New Users starting on SEPT 1
####################################################################
WITH
new_user_cohort AS (
SELECT DISTINCT user_pseudo_id as new_user_id
FROM
`projectId.analytics_YOUR_TABLE.events_*`
WHERE