Skip to content

Instantly share code, notes, and snippets.

Avatar

Ishidres

View GitHub Profile
@Ishidres
Ishidres / raspberrypi-picamera-motion-detection.py
Created May 7, 2020 — forked from FutureSharks/raspberrypi-picamera-motion-detection.py
A simple example of using the Raspberry Pi Camera Module and python picamera for motion detection
View raspberrypi-picamera-motion-detection.py
#!/usr/bin/python
import picamera
import cv2
import io
import numpy as np
import imutils
camera = picamera.PiCamera()
@Ishidres
Ishidres / update_atom.sh
Created Mar 31, 2019
Automatically updates Atom by downloading the latest version and replacing the currently installed version with it.
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/'
}
@Ishidres
Ishidres / update_vscode.sh
Last active Oct 10, 2020
Automatically updates Visual Studio Code by downloading the latest version and replacing the currently installed version with it.
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
@Ishidres
Ishidres / update_discord_canary.sh
Created Mar 23, 2019
Automatically updates DiscordCanary by downloading the latest canary version and replacing the currently installed version with it.
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"
@Ishidres
Ishidres / update_discord.sh
Last active Mar 23, 2019
Automatically updates Discord by downloading the latest version and replacing the currently installed version with it.
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"