Skip to content

Instantly share code, notes, and snippets.


Sandro Machado SandroMachado

View GitHub Profile
SandroMachado / pi-reboot-on-network-failure
Created May 14, 2017
Script to reboot the raspberry pi if there is no network available
View pi-reboot-on-network-failure
while true
wget -q --tries=10 --timeout=20 --spider
if [[ $? -eq 0 ]]; then
echo "Online"
echo "Offline"
echo raspberry | sudo -S sudo reboot
SandroMachado /
Last active Jan 13, 2021
Script to convert all the `JPEG` images to the `WEBP` format in your Android project
# Inpiration:
# `-lossless` not used to give support for Android 4.0+
# Make sure cwebp is installed.
if ! type "cwebp" > /dev/null; then
echo "Please install cwebp to continue:"
echo "brew install webp"
exit 1
View gist:34834c353fe353a7bf668ad2977b5ece
### Keybase proof
I hereby claim:
* I am SandroMachado on github.
* I am sandromachado ( on keybase.
* I have a public key whose fingerprint is 64A2 1ECB 97A1 604B D5B3 967E D630 EF06 008C 09AA
To claim this, I am signing this object: