ls *.jpg | xargs -I{} convert {} -resize '800x800>' resized_{}
ls *.mp4 | xargs -I{} ffmpeg -i {} -vf "scale=800:800:force_original_aspect_ratio=decrease,pad=800:800:(ow-iw)/2:(oh-ih)/2" resized_{}
#!/bin/sh | |
# Run yapf on modified Python files | |
files=$(git diff --cached --name-only --diff-filter=AM | grep -E '\.py$') | |
if [ -n "$files" ]; then | |
yapf --style "{based_on_style: pep8, column_limit: 120}" -i $files | |
git add $files | |
fi |
import sys | |
import whisper | |
from whisper.utils import write_srt | |
def run(input_path: str, output_path: str) -> None: | |
model = whisper.load_model("base") | |
result = model.transcribe(input_path) |
plugins=(git zsh-autosuggestions colored-man-pages zsh-syntax-highlighting) | |
alias ll='ls -alF' | |
alias lats='ls -lat | less' | |
alias dls='cd ~/Downloads' | |
alias dsk='cd ~/Desktop' | |
alias docs='cd ~/Documents' | |
alias cd..='cd ..' | |
alias op='open' | |
alias spark-shell='spark-shell --conf spark.driver.extraJavaOptions="-Dscala.color"' |
kafka-topics.sh --list --bootstrap-server localhost:9092 | |
kafka-topics.sh --describe --topic example-topic --bootstrap-server localhost:9092 | |
kafka-topics.sh --create --topic example-topic --bootstrap-server localhost:9092 | |
kafka-topics.sh --delete --topic example-topic --bootstrap-server localhost:9092 | |
kafka-console-consumer.sh --from-beginning --topic example-topic --bootstrap-server localhost:9092 | |
kafka-console-producer.sh --topic example-topic --bootstrap-server localhost:9092 |
version: '3.9' | |
services: | |
zookeeper: | |
image: wurstmeister/zookeeper | |
ports: | |
- "2181:2181" | |
kafka: | |
image: wurstmeister/kafka | |
ports: |
tfenv list-remote # list all versions | |
tfenv list # list installed versions | |
tfenv install <version> | |
tfenv use <version> | |
rm-rf .terraform/modules # delete modules | |
terraform init | |
terraform plan -target=module.<module-name> # plan change for target module | |
terraform apply -target=module.<module-name> # apply the change for target module |
[user] | |
name = <name> | |
email = <email> | |
[core] | |
editor = vim | |
[alias] | |
ss = status -s | |
lgd = log --oneline --graph --decorate | |
lagd = log --all --oneline --graph --decorate | |
ch = checkout |
dash to panel | |
clipboard indicator | |
night light slider |