Skip to content

Instantly share code, notes, and snippets.

View lpbas's full-sized avatar

Lucas Paul lpbas

  • Greece
View GitHub Profile
@lpbas
lpbas / FadeView.swift
Last active May 26, 2025 06:44
Fade a UIView in iOS using Gradient (Swift Extension)
//
// This program is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What The Fuck You Want
// To Public License, Version 2, as published by Sam Hocevar. See
//
// http://sam.zoy.org/wtfpl/COPYING
//
// for more details.
//
@lpbas
lpbas / GPIO.java
Last active September 27, 2019 08:39 — forked from rosterloh/gpio.java
Android class for GPIO control
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
This class allows you to control GPIO pins form android, by abstracting the command line excecution into a java class.
IMPORTANT NOTE: Requires root to run, since it is required to write to GPIO ports in /sys/class/gpio/
*/
public class GPIO {
@lpbas
lpbas / media_player.py
Last active June 10, 2026 08:50
Temporary workaround for HomeAssitant LG TV WebOS integration to restore the volume up/down buttons instead of the volume slider (check first comment for usage instructions)
"""Support for interface with an LG webOS TV."""
import asyncio
from collections.abc import Callable, Coroutine
from contextlib import suppress
from datetime import timedelta
from functools import wraps
from http import HTTPStatus
import logging
from typing import Any, Concatenate, cast