Skip to content

Instantly share code, notes, and snippets.

View ABGEO's full-sized avatar
System.out.println("Status Not Found!");

Temuri Takalandze ABGEO

System.out.println("Status Not Found!");
View GitHub Profile
@ABGEO
ABGEO / spaghetti-code.comment
Last active November 25, 2019 07:10
Spaghetti Code comment block.
// Dear programmer:
// When I wrote this code, only god and
// I knew how it worked.
// Now, only god knows it!
//
// Therefore, if you are trying to optimize
// this routine and it fails (most surely),
// please increase this counter as a
// warning for the next person:
//
@ABGEO
ABGEO / git_reset_permissions.sh
Last active June 29, 2021 07:09
Reset the original permissions in local Git repository.
#!/bin/bash
# Version 1
## 1) Create a reverse patch
## 2) Include only the permission changes
## 3) Apply the patch to our working copy
git diff -p -R --no-ext-diff --no-color | grep -E "^(diff|(old|new) mode)" --color=never | git apply
@ABGEO
ABGEO / export.sh
Last active July 7, 2022 09:28
Export-Import Drupal Database
#!/bin/env sh
mysqldump $DATABASE \
-u $USER \
-p"$PASSWORD" \
-h $HOST \
-P $PORT \
--set-gtid-purged=OFF \
--ignore-table=$DATABASE.$PREFIX_cache_bootstrap \
--ignore-table=$DATABASE.$PREFIX_cache_config \
@ABGEO
ABGEO / README.md
Created December 14, 2023 09:40
This shell script simplifies connecting to a PostgreSQL Cluster deployed by Zalando Postgres Operator.

README

This shell script simplifies connecting to a PostgreSQL Cluster deployed by Zalando Postgres Operator.

The script performs the following actions:

  • Retrieves the master pod's name
  • Fetches the password for the specified user
  • Prints port forwarding and connection instructions

Usage