Skip to content

Instantly share code, notes, and snippets.

View nonninz's full-sized avatar

Francesco Donadon nonninz

View GitHub Profile
@taskylizard
taskylizard / fmhy.md
Last active May 17, 2024 12:47
/r/freemediaheckyeah, in one single file (view raw)
@hranicka
hranicka / project.docker-compose.yml
Created November 28, 2019 12:29
Traefik & multiple docker-compose projects
version: '3'
services:
nginx:
labels:
- "traefik.enable=true"
- "traefik.http.routers.provys-transformer.rule=Host(`www.example.com`)"
- "traefik.http.routers.provys-transformer.tls=true"
networks:
- traefik
@jannau
jannau / eq3bt_gatt_dbus.py
Created December 13, 2016 07:59
bluez gatt dbus example for eQ-3 BT Smart Thermostat
#!/usr/bin/env python3
import sys
from datetime import datetime
import dbus
try:
from gi.repository import GObject
except ImportError:
import gobject as GObject
root@orion:/etc/acpi# cat /etc/acpi/events/fucking-headphones-plugged-in
# Fucking headphones man
event=jack/headphone HEADPHONE plug
action=/etc/acpi/fucking-headphones-plugged-in.sh
root@orion:/etc/acpi# cat /etc/acpi/fucking-headphones-plugged-in.sh
#!/bin/sh
# 2 is not pulled out of my ass. See `pactl list short sinks`.
su ema -c 'pactl list short sink-inputs | while read x y ; do pactl move-sink-input $x 2; done'
@AnderWeb
AnderWeb / Simple setup for item backgrounds pre - post lollipop
Last active January 12, 2024 18:04
Simple setup for item backgrounds pre/post lollipop
AppCompat-v7:21 provides a very useful way of dealing with pressed/focused/activated states maintaining backwards compatibility downto API-7, but there's a small issue (big for some) with the default selectableItemBackground: It uses some PNGs and/or default values for API<21.
The main reason is that android drawable resource definitions (prior API 21) CANNOT use theme attributes at all, so there's no way of making something like:
<shape android:shape="rectangle">
<solid android:color="?attr/colorControlHighlight" />
</shape>
For this, I've put this simple mockup on how to give your app better drawables that the appcompat defaults.