This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
REM This script uses ffmpeg to cut a video without losing much quality | |
SETLOCAL ENABLEEXTENSIONS EnableDelayedExpansion | |
SET me=%~n0 | |
REM Check if necessary parameters were passed | |
SET params=true | |
IF "%~1" EQU "" SET params=false | |
IF "%~2" EQU "" SET params=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script uses ffmpeg to cut a video without losing much quality | |
me=`basename "$0"` | |
# Check if necessary parameters were passed | |
if [ -z "$1" -o -z "$2" -o -z "$3" ]; then | |
echo "Usage: $me INPUT BEGIN END [OUTPUT=Dropbox]"; | |
exit 0 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# A script to convert a video to a desired filesize. | |
# Example use case: 8 MB Discord upload limit | |
# | |
# Requirements: | |
# - Python 3 | |
# - ffmpeg should be in PATH | |
# - ffmpeg-python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "config.hpp" | |
#include <fstream> | |
namespace config | |
{ | |
std::map<std::string, std::map<std::string, std::string>> tree{}; | |
const std::string filePath{"config.ini"}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
# LPEG example with simple error handling | |
This script was inspired by an attempt to teach myself some LPEG. | |
## Problem statement | |
Given a list of character pairs (openChar, closeChar), create a parser for a language of well balanced pairs, i.e. | |
a language consisting of an empty string and of expressions starting with any openChar, | |
followed by a chunk or nothing, and ending with the corresponding closeChar. |