Option | Description | Example |
---|---|---|
-i |
Input file | ffmpeg -i input.mp4 |
-vf |
Video filters (apply effects to video) | ffmpeg -i input.mp4 -vf "scale=1280:720" output.mp4 |
-c:v |
Video codec (specify video compression method) | ffmpeg -i input.mp4 -c:v libx264 output.mp4 |
-c:a |
Audio codec (specify audio compression method) | ffmpeg -i input.mp4 -c:a aac output.mp4 |
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 | |
print_usage() { | |
echo "usage: compress_video <input_file>" | |
echo "supported formats: mp4, webm, mkv, mov, avi, flv" | |
} | |
get_extension() { | |
f="${1##*/}" | |
case "$f" in |
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
import sys | |
import anthropic | |
from dotenv import load_dotenv | |
load_dotenv() | |
client = anthropic.Anthropic() | |
prompt_template = """ | |
Please review and edit the following text to ensure it is grammatically correct, clear, and concise. Aim to maintain a casual tone without being overly informal. Provide suggestions for improvement and explain any changes you make. Do not add double quotes in you rewrite answer. Answer in direct response. |
For inspiration and ideas for my Math Homework Generator, I figured that I should start a list of pages I should look through eventually to learn about what's out there and what might be lacking. MHG is often found in other lists which is how I found these links.
Custom Resource Makers - Worksheet Generators (Source)
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/bash | |
IFS=$'\n\t' | |
set -eou pipefail | |
if [[ "$#" -ne 3 || "${1}" == '-h' || "${1}" == '--help' ]]; then | |
cat >&2 <<"EOF" | |
gcr-cleaner.sh will cleans up the gcr tags or untaged images pushed in a repository (image name with the specific tag) | |
and except the given number most recent images. |
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
/** | |
* Create and return a new [Painter] that wraps [painter] with its [alpha], [colorFilter], or [onDraw] overwritten. | |
*/ | |
fun forwardingPainter( | |
painter: Painter, | |
alpha: Float = DefaultAlpha, | |
colorFilter: ColorFilter? = null, | |
onDraw: DrawScope.(ForwardingDrawInfo) -> Unit = DefaultOnDraw, | |
): Painter = ForwardingPainter(painter, alpha, colorFilter, onDraw) |
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
/* | |
* MIT License | |
* | |
* Copyright (c) 2022 Albert Chang | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") | |
// Tooltip implementation for AndroidX Jetpack Compose | |
// See usage example in the next file | |
// Tested with Compose version **1.1.0-alpha06** | |
// Based on material DropdownMenu implementation. | |
import androidx.compose.animation.core.MutableTransitionState | |
import androidx.compose.animation.core.animateFloat |
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
import StringUtils.encodeHex | |
import java.io.File | |
import java.io.FileInputStream | |
import java.io.InputStream | |
import java.security.MessageDigest | |
object HashUtils { | |
const val STREAM_BUFFER_LENGTH = 1024 |
NewerOlder