Skip to content

Instantly share code, notes, and snippets.

View Sekiphp's full-sized avatar

Luboš Hubáček Sekiphp

View GitHub Profile
pkgname=libzookeeper
pkgver=3.8.4
pkgrel=1
pkgdesc="The Apache ZooKeeper system for distributed coordination is a high-performance service for building distributed applications."
url="https://zookeeper.apache.org"
arch="all"
license="Apache-2.0"
subpackages="$pkgname-dev"
options="!check" # No test suite
source="https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4.tar.gz"
#!/bin/bash
# Load variables
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$DIR/variables.sh"
# Read pod name into variable (allowed only valid pod names)
read_pod_name() {
while read -p "Open shell for pod name: " POD_NAME </dev/tty
do
@Sekiphp
Sekiphp / open_repo_in_browser.sh
Created November 19, 2023 21:51
Simple script for open git repository in brower. Working only for repositories with one specific pattern. Useful for Magento 2.
#!/bin/bash
REPO_NAME=$(basename "$PWD")
$(explorer.exe "https://server.com/project/_git/magento2-"$REPO_NAME"")
@Sekiphp
Sekiphp / init_git_vendor.sh
Created November 19, 2023 21:16
Init git repositories in vendor in case when all repos in folder are from same git and follows directory naming pattern. Useful for Magento 2 projects.
#!/bin/bash
COLOR_RED="\033[0;31m"
clear
# iterate folders
ls -d */ | tr -d "/" | while read -r folder;
do
GIT_TOPLEVEL_FOLDER=$(git -C $folder rev-parse --show-toplevel)
git config --global alias.last 'log -1 HEAD'
@Sekiphp
Sekiphp / SSH agent for WSL
Created February 25, 2023 12:12
Working on Ubuntu 20.04 LTS
#!/bin/bash
echo "SSH agent init script"
env=~/.ssh/agent.env
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; }
agent_start () {
echo "Starting new SSH agent"
git config --global push.default current
@Sekiphp
Sekiphp / change_git_remotes.sh
Last active December 13, 2022 16:18
Mass change of git remotes for more repositories in same folder. Can be used for Magento 2 repositories located in app/code/Namespace/
#!/bin/bash
clear
prefix=""
ls -d */ | while read -r folder;
do
cd "$folder"
echo "Before:"
# GIT bash integration
if [[ -e /usr/lib/git-core/git-sh-prompt ]]; then
source /usr/lib/git-core/git-sh-prompt
export GIT_PS1_SHOWCOLORHINTS=true
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export GIT_PS1_SHOWUPSTREAM="auto"
@Sekiphp
Sekiphp / Fix changes in submodule (-dirty commits)
Created May 18, 2022 10:45
Fix changes in submodule (-dirty commits)
cd submodule
git reset --hard HEAD
git clean -fd .
cd ..
git submodule update --init --recursive