Skip to content

Instantly share code, notes, and snippets.

View thiagoalmeidasa's full-sized avatar

Thiago Almeida thiagoalmeidasa

View GitHub Profile
@thiagoalmeidasa
thiagoalmeidasa / Shield_Intents.MD
Created April 26, 2023 15:38 — forked from mcfrojd/Shield_Intents.MD
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.

Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown


Start apps on your android device (in the examples below, my Nvidia Shield TV) from Home Assistant

alt text

Starts Youtube App

entity_id: media_player.shield
command: >-
@thiagoalmeidasa
thiagoalmeidasa / ⁄etc⁄pacman.d⁄hooks⁄linux-modules-post.hook
Created August 13, 2022 12:10 — forked from ephemient/⁄etc⁄pacman.d⁄hooks⁄linux-modules-post.hook
(Arch Linux) Keep current modules around during kernel upgrade
[Trigger]
Operation = Upgrade
Type = Package
Target = linux
[Action]
Description = Restore Linux kernel modules
When = PostTransaction
Depends = coreutils
Depends = rsync
@thiagoalmeidasa
thiagoalmeidasa / aws-cli.sh
Created October 18, 2021 09:21 — forked from devasat/aws-cli.sh
AWS CLI Examples
# ********** EC2 ***********
# describe ec2 instances
aws ec2 describe-instances \
--query 'Reservations[*].Instances[*].[InstanceId,Tags[?Key==`Name`].Value|[0],State.Name,
PrivateIpAddress,PublicIpAddress]' \
--output table
# stopped instances
@thiagoalmeidasa
thiagoalmeidasa / docker-buildx.sh
Created May 15, 2021 15:14
Multi platform builds with buildx
#!/bin/sh
# This script demonstrates how to use `docker buildx` to build container
# images for the linux/amd64 and linux/arm64 platforms. It creates a
# `docker buildx` builder instance when required.
#
# If you change the platforms, be sure to
#
# (1) delete the buildx builder named `-builder`, and
# (2) update the corresponding node-affinities in k8s/pod.yaml.
@thiagoalmeidasa
thiagoalmeidasa / MANIFEST.in
Created May 8, 2021 22:24 — forked from jpmens/MANIFEST.in
Including git version in setup.py files. (Requires at least _one_ tag in the repo) Normally used to make things like, "python setup.py sdist" give you a predictable name for files. Normally used with tags on the repo like 0.1 or 2.3.0 You should add RELEASE-VERSION to MANIFEST.in so that end users of the tarball can use this too.
include RELEASE-VERSION
include version.py
# Anything else you normally use
@thiagoalmeidasa
thiagoalmeidasa / local-k8s.sh
Created April 23, 2021 22:28 — forked from tom-butler/local-k8s.sh
Local kubernetes cluster using k3d, with pvc support
#!/bin/bash
# Install k3d
k3d --version || wget -q -O - https://raw.githubusercontent.com/rancher/k3d/master/install.sh | bash
# verify it
k3d check-tools
# create a volume and cluster
docker volume create kube-volume
@thiagoalmeidasa
thiagoalmeidasa / ddcutil_dell_U2520D.sh
Last active April 16, 2021 20:19
ddcutil commands to control dell U2520D
#!/bin/bash
# Get Display Mode
# sudo ddcutil getvcp 0xdc --bus=9 --verbose
# Set Display Mode to movie
# sudo ddcutil setvcp 0xdc 0x03 --bus=9 --verbose
# Set Display Mode to standard
# sudo ddcutil setvcp 0xdc 0x00 --bus=9 --verbose
@thiagoalmeidasa
thiagoalmeidasa / molecule-3-up.sh
Created July 20, 2020 06:28 — forked from geerlingguy/molecule-3-up.sh
Molecule 3.0 update script with all the little changes I had to make.
#!/bin/bash
#
# Update things to be compatible with Molecule 3.0.
#
# This script is NOT idempotent, and should never be run again.
exit 1
export LINT_STRING="lint: |
set -e
yamllint .
@thiagoalmeidasa
thiagoalmeidasa / ducky.md
Created June 29, 2020 21:06 — forked from schmich/ducky.md
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

@thiagoalmeidasa
thiagoalmeidasa / bitbucket_build_status.sh
Created January 27, 2020 14:43
Bitbucket status notifier
#!/usr/bin/env sh
# Push GitLab CI/CD build status to Bitbucket Cloud
if [ -z "$BITBUCKET_ACCESS_TOKEN" ]; then
echo "ERROR: BITBUCKET_ACCESS_TOKEN is not set"
exit 1
fi
if [ -z "$BITBUCKET_USERNAME" ]; then
echo "ERROR: BITBUCKET_USERNAME is not set"
exit 1