A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
<? | |
// | |
// AUTO KEYWORD-BASED FOLLOWER CURATION BOT (by @levelsio) | |
// | |
// File: twitterFollowerCuratorBot.php | |
// | |
// Created: May 2021 | |
// License: MIT | |
// |
# I needed to delete ~300k objects from an S3 bucket in a hurry. The better and cheaper solution is to use a lifecycle rule, but those can take a day or two to take effect. | |
bucket="i-want-to-lose-all-my-data" | |
mkdir -p deletes | |
# 1. List all the objects in the bucket, transform them 1000 at a time into request objects for DeleteObjects, write each to a separate file | |
aws s3api list-objects-v2 --bucket "${bucket}" \ | |
| jq -c '.Contents | _nwise(1000) | map({ Key: .Key }) | { Objects: ., Quiet: true }' \ | |
| awk '{ f = "deletes/" NR ".json"; print $0 > f; close(f) }' |
#!/bin/bash | |
[[ $UID == 0 ]] || { echo "run as sudo to install"; exit 1; } | |
REPO="https://github.com/BurntSushi/ripgrep/releases/download/" | |
RG_LATEST=$(curl -sSL "https://api.github.com/repos/BurntSushi/ripgrep/releases/latest" | jq --raw-output .tag_name) | |
RELEASE="${RG_LATEST}/ripgrep-${RG_LATEST}-x86_64-unknown-linux-musl.tar.gz" | |
TMPDIR=$(mktemp -d) | |
cd $TMPDIR | |
wget -O - ${REPO}${RELEASE} | tar zxf - --strip-component=1 |
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
pipeline { | |
agent any | |
stages { | |
stage('Checkout') { | |
steps { | |
checkout scm | |
sh 'rm -rf build/{logs,pdepend}' |
SET @column_name = 'Custom2'; | |
select @column_name; | |
SET @width_query = CONCAT('SET @max_width = (SELECT CHAR_LENGTH(' , @column_name , ') AS mlen FROM `HS_Request` ORDER BY mlen DESC LIMIT 1)+10;'); | |
PREPARE stmt FROM @width_query; | |
EXECUTE stmt; | |
DEALLOCATE PREPARE stmt; | |
SET @query = CONCAT('ALTER TABLE HS_Request MODIFY ', @column_name, ' VARCHAR(', @max_width, ');'); | |
PREPARE stmt FROM @query; | |
EXECUTE stmt; | |
DEALLOCATE PREPARE stmt; |
for bucket in $(aws s3api list-buckets --query 'Buckets[*].{Name:Name}' --output text) | |
do | |
echo "$bucket:" | |
region=$(aws s3api get-bucket-location --bucket $bucket --query 'LocationConstraint' --output text | awk '{sub(/None/,"eu-west-1")}; 1') | |
parts=$(aws s3api list-multipart-uploads --bucket $bucket --region $region --query 'Uploads[*].{Key:Key,UploadId:UploadId}' --output text) | |
if [ "$parts" != "None" ]; then | |
IFS=$'\n' |
######################## | |
## Variables | |
######################## | |
variable "environment_name" { | |
description = "The name of the environment" | |
} | |
variable "vpc_id" { |
root /app/public | |
tls /app/_docker/caddy/server.crt /app/_docker/caddy/server.key | |
fastcgi / php:9000 php | |
errors visible | |
rewrite { | |
regexp .* | |
ext / | |
to /index.php?{query} | |
} |
server { | |
listen 80; | |
listen [::]:80; | |
server_name site.com; | |
root /home/forge/site.com; | |
# FORGE SSL (DO NOT REMOVE!) | |
# ssl on; | |
# ssl_certificate; | |
# ssl_certificate_key; |