Skip to content

Instantly share code, notes, and snippets.

Avatar

risinek

View GitHub Profile
@mill1000
mill1000 / raspbianmonitor.sh
Created Jan 25, 2020
raspibanmonitor - Raspberry Pi 3 Monitor Script
View raspbianmonitor.sh
#!/bin/bash
# Continuously queries RPi3 GPU for temperature, clock rates and throttled status
# Original from https://www.raspberrypi.org/forums/viewtopic.php?t=244320
echo -e "Time Temp CPU Core Health Vcore"
while true ; do
Temp=$(vcgencmd measure_temp | cut -f2 -d=)
Clockspeed=$(vcgencmd measure_clock arm | awk -F"=" '{printf ("%0.0f",$2/1000000); }' )
Corespeed=$(vcgencmd measure_clock core | awk -F"=" '{printf ("%0.0f",$2/1000000); }' )
Health=$(vcgencmd get_throttled | awk -F"=" '{printf("0x%08x\n",$2)}')
CoreVolt=$(vcgencmd measure_volts | cut -f2 -d=)
@y-polek
y-polek / doze_mode_adb_commands.sh
Last active Feb 25, 2021
adb commands to test Doze mode
View doze_mode_adb_commands.sh
#! /bin/zsh
# Buttery powered state
adb shell dumpsys battery | grep powered
# Unplug battery
adb shell dumpsys battery unplug
# Reset battery
adb shell dumpsys battery reset
@mill1000
mill1000 / README.md
Last active Feb 17, 2021
Headless A2DP Audio Streaming on Raspbian Stretch
View README.md

About

This gist will show how to setup Raspbian Stretch as a headless Bluetooth A2DP audio sink. This will allow your phone, laptop or other Bluetooth device to play audio wirelessly through a Rasperry Pi.

Motivation

A quick search will turn up a plethora of tutorials on setting up A2DP on the Raspberry Pi. However, I felt this gist was necessary because this solution is:

  • Automatic & Headless - Once setup, the system is entirely automatic. No user iteration is required to pair, connect or start playback. Therefore the Raspberry Pi can be run headless.
  • Simple - This solution has few dependencies, readily available packages and minimal configuration.
  • Up to date - As of December 2017. Written for Raspbian Stretch & Bluez 5.43

Prerequisites

@glnds
glnds / less-cheatsheet.md
Last active Feb 19, 2021
Less Cheatsheet
View less-cheatsheet.md

Less Cheatsheet

less {filename}
Navigation
SPACE forward one window
b backward one window
d forward half window