Skip to content

Instantly share code, notes, and snippets.

View ConfuSomu's full-sized avatar
🏳️‍🌈
enby!

ConfuSomu ConfuSomu

🏳️‍🌈
enby!
View GitHub Profile
@ConfuSomu
ConfuSomu / get-alarchive-package.sh
Created April 22, 2023 16:43
Script for retriving packages from the Arch Linux Archive. This is handy when you don't upgrade your system often but still have to install packages.
#!/bin/bash
# Script that allows installing packages from the Arch Linux Archive
# Made by ConfuSomu/Twilight on the 2023-01-12
# Licensed under the GNU GPL
URL_BASE="archive.archlinux.org"
PKG_DIR="/var/cache/pacman/pkg"
usage() {
echo "$(basename ${0}) <packages to install from archive>"
@ConfuSomu
ConfuSomu / iOS Shortcuts: File…
Last active May 22, 2020 19:31
Extensive iOS File… menu built in Shortcuts
https://www.icloud.com/shortcuts/48f91cc36a4749b784ae74c29f3584e6
In Settings > Shortcuts, you have to allow untrusted shortcuts to be able to add this shortcut to your Shortcuts library.
@ConfuSomu
ConfuSomu / camera.py
Created January 28, 2020 15:13
Script that displays a video feed from a USB webcam using pygame.
#!/usr/bin/env python3
# Title: Webcam capture
# Author: ConfuSomu
# Date: This program was originally written in december 2018, comments added in january 2020.
# Dependencies: pygame
# Description: Script that displays a video feed from a USB webcam. Worked on Raspbian.
# I am probably importing unused modules...
import pygame
import pygame.camera
@ConfuSomu
ConfuSomu / timelapse.sh
Last active December 27, 2019 18:30
Script that allows you to easily take a photo using your USB webcam.
#!/bin/bash
# Title: Webcam capture
# Author: ConfuSomu
# Date: This program was originally written in august 2018 but improvements were made in december 2019.
# Dependencies: fswebcam
# Description: Script that allows you to easily take a photo using your USB webcam. Using cron, you can use this script to take a timelapse. Works correctly on Raspberry Pi.
DATE=$(date +"%Y%m%dT%H%M%S%z") #ISO 8601 date format
until fswebcam -r 1280x720 --no-banner -S 8 --fps 15 /path/to/dir/Timelapse/$DATE.jpg