Skip to content

Instantly share code, notes, and snippets.

View hgross's full-sized avatar

Henning Groß hgross

View GitHub Profile
@hgross
hgross / Android-Broadcasts.md
Created February 6, 2023 11:47 — forked from MohammadSamandari/Android-Broadcasts.md
Broadcasts and Broadcast Receivers

Broadcasts

Broadcasts are messages that the Android system and Android apps send when events occur that might affect the functionality of other apps. For example, the Android system sends an event when the system boots up, when power is connected or disconnected, and when headphones are connected or disconnected. Your Android app can also broadcast events, for example when new data is downloaded.

In general, broadcasts are messaging components used for communicating across apps when events of interest occur. There are two types of broadcasts:

  • System broadcasts are delivered by the system.
@hgross
hgross / throttle-poorly-made-software.sh
Last active February 27, 2020 06:56 — forked from golimpio/egos_throttle.sh
Run cputhrottle for a list of applications in order to limit their CPU usage.
#!/bin/bash
# requires cputhrottle and pidof
# $ sudo port intall cputhrottle pidof
# or
# $ brew install cputhrottle pidof
# Run cputhrottle for a list of applications in order to limit their CPU usage.
# This script needs `pidof` and `cputhrottle` installed, which can be installed from homebrew.
@hgross
hgross / generate-ssh-key.sh
Created August 13, 2019 13:13 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa