View raspberrypi-picamera-motion-detection.py
#!/usr/bin/python | |
import picamera | |
import cv2 | |
import io | |
import numpy as np | |
import imutils | |
camera = picamera.PiCamera() |
View update_atom.sh
# Usage: | |
# $ chmod +x update_atom.sh | |
# $ ./update_atom.sh | |
# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c | |
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | | |
grep '"tag_name":' | | |
sed -E 's/.*"([^"]+)".*/\1/' | |
} |
View update_vscode.sh
notify-send "Updating Visual Studio Code..." | |
# killing VS Code will give you a crash message and will reopen it | |
# it's also unsafe because you might lose unsaved data | |
# pkill code | |
# automatically gets the latest version of VS Code | |
wget "https://update.code.visualstudio.com/latest/linux-x64/stable" | |
# remove currently installed version of VS Code and replace it with the new downloaded one |
View update_discord_canary.sh
notify-send "Updating Discord..." | |
# terminate Discord if it's currently running | |
pkill Discord* | |
wget "https://discordapp.com/api/download/canary?platform=linux&format=tar.gz" | |
# remove currently installed version of Discord and replace it with the new downloaded one | |
rm -r DiscordCanary | |
tar -xf "canary?platform=linux&format=tar.gz" |
View update_discord.sh
notify-send "Updating Discord..." | |
# terminate Discord if it's currently running | |
pkill Discord* | |
wget "https://discordapp.com/api/download?platform=linux&format=tar.gz" | |
# remove currently installed version of Discord and replace it with the new downloaded one | |
rm -r Discord | |
tar -xf "download?platform=linux&format=tar.gz" |