Skip to content

Instantly share code, notes, and snippets.

@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 },
@szydan
szydan / gist:fb987ba33a47336a8ba372eb5dd20e2d
Created August 17, 2024 14:59
Backup iphone to external drive
rm -rf ~/Library/Application\ Support/MobileSync/Backup
ln -s /Volumes/T7_1T_red/Backup ~/Library/Application\ Support/MobileSync/Backup
open finder select iphone and press backup now
@szydan
szydan / gist:fc28e2a4e487b6c73c7e126722a06c0f
Created August 6, 2024 09:51
port forward to use 3000 as socks5 proxy
ssh -fND 127.0.0.1:3000 username@server
from https://blog.lasne.pro/posts/bypass_country_restrictions_with_ssh/
@szydan
szydan / gist:63441efa713fca22d3466feb6578694e
Created July 17, 2024 15:16
How to reopen a pull-request from github?
You need the rights to reopen pull requests on the repository.
The pull request hasn't been merged, just closed.
Go to Pull requests add filter `is:closed` choose PR you want to reopen. Select from checkbox and mark as Open.