less {filename}
Navigation | |
---|---|
SPACE |
forward one window |
b |
backward one window |
d |
forward half window |
#/bin/bash | |
TOKEN='put your token here. Get a new from https://api.slack.com/docs/oauth-test-tokens' | |
dbus-monitor --session type='signal',interface='com.canonical.Unity.Session' | while true | |
do | |
read x | |
if echo "$x" | grep -q Locked; then | |
echo "set yourself away at $(date)" | |
curl -X GET -H "Cache-Control: no-cache" "https://slack.com/api/users.setPresence?token=$TOKEN&presence=away" |
In February 2017, Google announced the availability GPU-based VMs. I spun up a few of these instances, and ran some benchmarks. Along the way, I wrote down the steps taken to provision these VM instances, and install relevant drivers.
Update April 2019: Updated instructions to use instances with the Tesla T4 GPUs.
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.
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:
#! /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 |
#!/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=) |