Skip to content

Instantly share code, notes, and snippets.

@CannonballSkippy
CannonballSkippy / Video-and-Subtitle-merger-batch-for-mkvmerge.bat
Created May 15, 2017 13:27
This is a batch script that will merge subtitles with a video file, resulting in an *.mkv file with internal subtitles.
@echo off
echo ----------------------------------------------------------------------
echo VIDEO AND SUBTITLE MERGER
echo version 1.0.0 by Seyoum
echo ----------------------------------------------------------------------
:: Set file video extention
:VIDEOFILEEXTENTION
echo.
set /p videofileformat=Enter the video file type extension (e.g mp4):
if /I "%videofileformat%" EQU "webm" echo You have chosen %videofileformat% as your video file format&goto:SUBTITLEFILEEXTENTION
@krnd
krnd / .flake8
Last active June 22, 2024 04:57
python-flake8
# .flake8
#
# AUTHOR
# krnd
#
# VERSION
# 1.4
#
# SEE ALSO
# http://flake8.pycqa.org/en/latest/user/options.html
@tgardiner
tgardiner / aws_s3_etag_local_compare.py
Created January 13, 2019 02:52
Compare AWS S3 Etag to local file
#!/usr/bin/env python3.6
import os
import sys
from hashlib import md5
from argparse import ArgumentParser
parser = ArgumentParser(description='Compare an S3 etag to a local file')
parser.add_argument('inputfile', help='The local file')
parser.add_argument('etag', help='The etag from s3')
args = parser.parse_args()
@gordonmurray
gordonmurray / convertCaddyCerts.md
Last active May 27, 2024 11:42
Steps to convert certificates generated by Caddy Server to certificates that Nginx can use

Convert Caddy Server certificates to LetsEncrypt certificates to be used by Nginx

Caddy

When using Caddy Server, it stores certificates in ~/.caddy/acme/acme-v01.api.letsencrypt.org/sites/{your domain name}/

3 files are stored in the folder called:

  • {yourdomain}.crt
  • {yourdomain}.json
  • {yourdomain}.key
@benbjurstrom
benbjurstrom / Code.gs
Last active July 8, 2024 18:13
PurgeOldEmails
/*
|--------------------------------------------------------------------------
| PurgeOldEmails
|--------------------------------------------------------------------------
| https://gist.github.com/benbjurstrom/00cdfdb24e39c59c124e812d5effa39a
|
*/
// Purge messages automatically after how many days?
var DELETE_AFTER_DAYS = 7
@burak-kara
burak-kara / reset.gs
Last active June 6, 2024 10:04
Google Drive - Remove Sharing & Access Permissions from folders, subfolders and files. Note that Google Apps Script commands can be changed after this version.
// Note that this script will remove all permissions of all files and subfolders
// (including files in subfolders) of the given folder
// https://drive.google.com/drive/folders/abcdefgh
const id = "abcdefgh";
function start() {
const folder = DriveApp.getFolderById(id);
getSubFolders(folder);
// At the end, reset for parent folder
@jordanlambrecht
jordanlambrecht / autoDeleteGmail.js
Last active July 2, 2024 20:57
Auto Delete / Archive Emails in Gmail
function autoDelete() {
console.log('Started autoDelete run.');
var delayDays = 2;
var maxDate = new Date();
maxDate.setDate(maxDate.getDate()-delayDays);
var label = GmailApp.getUserLabelByName("delete me");
var threads = label.getThreads();
if(threads.length > 0){
console.log('Found ' + threads.length + ' emails marked for deletion.');