Skip to content

Instantly share code, notes, and snippets.

View Ishidres's full-sized avatar

Ishidres

View GitHub Profile
@Ishidres
Ishidres / raspberrypi-picamera-motion-detection.py
Created May 7, 2020 16:38 — forked from FutureSharks/raspberrypi-picamera-motion-detection.py
A simple example of using the Raspberry Pi Camera Module and python picamera for motion detection
#!/usr/bin/python
import picamera
import cv2
import io
import numpy as np
import imutils
camera = picamera.PiCamera()
@Ishidres
Ishidres / update_atom.sh
Created March 31, 2019 15:38
Automatically updates Atom by downloading the latest version and replacing the currently installed version with it.
# 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 October 16, 2021 23:49
Automatically updates Visual Studio Code by downloading the latest version and replacing the currently installed version with it.
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 March 23, 2019 14:03
Automatically updates DiscordCanary by downloading the latest canary version and replacing the currently installed version with it.
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 March 23, 2019 14:02
Automatically updates Discord by downloading the latest version and replacing the currently installed version with it.
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"