Skip to content

Instantly share code, notes, and snippets.

ffmpeg -i input.mov \
-c:v libx264 -preset medium -crf 28 \
-c:a aac -b:a 128k \
output.mp4
ffmpeg -i input.mov \
-vf scale=1280:-2 \
-c:v libx264 -preset medium -crf 28 \
-an \
@szydan
szydan / gist:05ba4b6024e72ff716bf97c14c9c97b7
Created May 22, 2025 14:46
replacing file inside zip
// THIS is the trick to have the same folder structure as in the archive you are modifying
mkdir -p siren-platform-demo-data-14.8.0-SNAPSHOT-darwin-x86_64/siren-investigate
unzip -p siren-platform-demo-data-14.8.0-20250513.083732-50-darwin-x86_64.zip 'siren-platform-demo-data-14.8.0-SNAPSHOT-darwin-x86_64/siren-investigate/package.json' > siren-platform-demo-data-14.8.0-SNAPSHOT-darwin-x86_64/siren-investigate/package.json
less siren-platform-demo-data-14.8.0-SNAPSHOT-darwin-x86_64/siren-investigate/package.json
// HERE MODIFY THE VERSION
zip -ur siren-platform-demo-data-14.8.0-20250513.083732-50-darwin-x86_64.zip 'siren-platform-demo-data-14.8.0-SNAPSHOT-darwin-x86_64/siren-investigate/package.json'
GET .siren/_search
{
"_source": false,
"query": {
"bool": {
"must": [
{ "exists": { "field": "search.indexPattern.fieldFormatMap.keyword" }},
{
"script": {
"script": {
@szydan
szydan / gist:35160debce7d1c8039a36c1a13f0bfa6
Created March 20, 2025 23:04
To manually fix unassigned shard
GET _cat/nodes?format=json
GET _cat/shards/index-name
GET _cat/indices/index-name
POST _cluster/reroute
{
"commands": [{
"allocate_empty_primary": {
@szydan
szydan / gist:7328a32927bddd942fac1cd13331cc2d
Created January 6, 2025 21:27
Number of existing fields in .siren
curl -s -H "Content-Type: application/json" -XGET -k -u admin:password https://localhost:9220/.siren/_field_caps?fields=* | jq '.fields | length'
@szydan
szydan / gist:5495a40aad1f0378634e978a95c7c199
Created December 4, 2024 17:38
Change node-pool size
gcloud container clusters update cicd \
--node-pool=pr-build-investigate-1 \
--enable-autoscaling \
--min-nodes=1 \
--max-nodes=100 \
--zone=europe-west1-c
docker pull europe-west1-docker.pkg.dev/siren-cicd/docker/jenkins-agent:chrome-128-latest
docker run -it europe-west1-docker.pkg.dev/siren-cicd/docker/jenkins-agent:chrome-128-latest /bin/bash
google-chrome --version
google-chrome-stable --version
@szydan
szydan / gist:073d913b75399faf6273d013bd5d2057
Last active October 4, 2024 11:49
How to redeploy the deployment with new image
Before running the commands make sure you are on correct cluster
kubectl config use-context gke_siren-cicd_europe-west1-c_cicd-volatile
kubectl -n branch-er set image deployment/branch-er-er \
platform-bundle-demo-data-snapshot=eu.gcr.io/siren-cicd/siren-platform-demo-data-snapshot:branch-er-75
kubectl -n branch-er rollout status deployment/branch-er-er
@szydan
szydan / gist:20664ed46f7fd172f0f63f5705872900
Created September 5, 2024 07:47
To start debugging session pod with mounted filesystem
create a debugging pod
file system mounted at
/host
kubectl debug node/gke-cicd-build-pool-4509cbfd-vh9s -it --image=ubuntu
see how much space is taken there
all the overlay
// inches
const sheetSizes = {
A0: { width: 46.81, height: 33.11 },
A1: { width: 33.11, height: 23.4 },
A2: { width: 23.4, height: 16.5 },
A3: { width: 16.5, height: 11.7 },
A4: { width: 11.7, height: 8.3 },
A5: { width: 8.3, height: 5.8 },
A6: { width: 5.8, height: 4.1 },
A7: { width: 4.1, height: 2.9 },