Skip to content

Instantly share code, notes, and snippets.

@tanhauhau
tanhauhau / decreaseITunesVolume.scpt
Created September 13, 2015 09:07
Adjust iTunes volume through Applescript
tell application "iTunes"
set vol to sound volume
set vol to vol - 10
if vol is less than 0 then
set vol to 0
end if
set the sound volume to vol
end tell
@zburgermeiszter
zburgermeiszter / linux-fake-webcam-loop.sh
Created December 29, 2015 21:48
Loop video file as fake webcam device with ffmpeg
ffmpeg -re -f concat -i <(for i in {1..9999}; do printf "file '%s'\n" input.mp4; done) -f v4l2 /dev/video1 && !!
#!/usr/bin/env bash
#
# see: https://gist.github.com/gregorynicholas/2160046ec6946a2ce0fa
# src: https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# updated: 2015-06-06
#
# ask for the administrator password upfront
sudo -v
@useless-stuff
useless-stuff / anniballo.com.conf
Last active February 9, 2023 16:38
TLS/SSL - Let's Encrypt free SSL certificate virtual host example
<VirtualHost *:80>
ServerName anniballo.com
ServerAlias diego.anniballo.com www.anniballo.com
Redirect permanent / https://diego.anniballo.com/
</VirtualHost>
<VirtualHost *:443>
ServerName anniballo.com
ServerAlias diego.anniballo.com www.anniballo.com
ServerAdmin [email protected]
# [...]
@useless-stuff
useless-stuff / letsencrypt.sh
Created February 18, 2016 20:26
TLS/SSL - Let's Encrypt free SSL certificate install script
#!/bin/bash
a2enmod ssl -y
apt-get update -y
apt-get install git -y
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
cd /opt/letsencrypt
./letsencrypt-auto --apache -d anniballo.com -d diego.anniballo.com -d www.anniballo.com
#!/bin/bash
# Anh Nguyen <[email protected]>
# 2016-04-30
# MIT License
# This script takes in same-size images from a folder and make a crossfade video from the images using ffmpeg.
# Make sure you have ffmpeg installed before running.
# The output command looks something like the below, but for as many images as you have in the folder.
@tayvano
tayvano / gist:6e2d456a9897f55025e25035478a3a50
Created February 19, 2017 05:29
complete list of ffmpeg flags / commands
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)
@ryanburnett
ryanburnett / Local SSL on macOS.md
Last active November 15, 2024 19:14 — forked from jonathantneal/README.md
Local SSL websites on macOS Sierra

Local SSL websites on macOS Sierra

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward the edit command to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
@mdonkers
mdonkers / server.py
Last active June 14, 2025 20:50
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@hlorand
hlorand / RaspberryPiVideoRecord.sh
Created June 24, 2017 18:37
Video recording and streaming script for Raspberry Pi + Pi Camera
#!/bin/bash
#
# Video recording script for Raspberry Pi. Set bitrate and recording time below
#
# To autostart this script after login, edit /etc/xdg/lxsession/LXDE-pi/autostart and add the following line BEFORE "@xsreensaver":
#
# sh ./RaspberryPiVideoRecord.sh
#
# To convert the output .h264 file to mp4:
#