Skip to content

Instantly share code, notes, and snippets.

@wopfel
wopfel / fswebcam-loop.sh
Created August 23, 2016 17:30
Save a webcam picture every x seconds (suitable for a timelapse). Created on a Raspberry Pi 3 running Arch Linux.
#!/bin/bash
# Exit script if /mnt is not mounted somewhere
# Prevents filling the root filesystem (/)
if ! mountpoint /mnt ; then
>&2 echo "Error: No mountpoint."
exit 1
fi
# Endless loop
@robinsloan
robinsloan / unfave.rb
Last active November 6, 2024 14:29
Unfave script, because why not??
#!/usr/bin/env ruby
require "rubygems"
require "twitter"
require "json"
require "faraday"
# things you must configure
TWITTER_USER = "your_username"
# get these from dev.twitter.com
@flesueur
flesueur / deloldtweets.py
Created June 26, 2018 10:11
Delete (very) old tweets obtained from a twitter archive
#!/bin/python3
# Largely copied from http://www.mathewinkson.com/2015/03/delete-old-tweets-selectively-using-python-and-tweepy
# However, Mathew's script cannot delete tweets older than something like a year (these tweets are not available from the twitter API)
# This script is a complement on first use, to delete old tweets. It uses your twitter archive to find tweets' ids to delete
# How to use it :
# - download and extract your twitter archive (tweet.js will contain all your tweets with dates and ids)
# - put this script in the extracted directory
# - complete the secrets to access twitter's API on your behalf and, possibly, modify days_to_keep
# - delete the few junk characters at the beginning of tweet.js, until the first '[' (it crashed my json parser)
# - review the script !!!! It has not been thoroughly tested, it may have some unexpected behaviors...
@madskjeldgaard
madskjeldgaard / imgplusaudio2video.sh
Created January 31, 2025 11:25
Combine a still image with an audio file into a video file for social media using ffmpeg
#!/bin/bash
# This script combines an image and an audio file into a video using ffmpeg.
# It prompts the user for the paths to the image and audio files, an optional
# fixed length in seconds, and the output file name. The script ensures that
# the paths are properly quoted and constructs the appropriate ffmpeg command.
# Function to add quotes around a path if not already present
add_quotes() {
local path="$1"