This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Switching two different SSH identities | |
# Solve setting of remote url in every repository like https://docs.gitlab.com/ee/ssh/#multiple-accounts-on-a-single-gitlab-instance | |
# | |
# 1. Create directory structure: | |
# ~/.ssh-work | |
# ├── home | |
# │ ├── .home # important! | |
# │ ├── config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
br = branch | |
brd = branch -d | |
brD = branch -D | |
# brp = "!git branch --merged | grep -v '\\*\\|development' | xargs -n 1 git branch -d" | |
brp = !git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -D | |
brv = !git -P branch -va | |
bru = !git fetch && git reset origin/$(git branch --show-current) --hard | |
ci = commit | |
co = checkout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redis-cli --scan --pattern 'myKeyToSearch*' | xargs redis-cli del |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
start=$(date +%s.%N) | |
# how many keys get in one time | |
COUNT=10000 | |
# count of loops | |
LOOP=$(seq 0 1 10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# 1. install `composer require nextras/migrations` | |
# 2. install favorite DBAL (Dibi | Nextras\Dbal | Doctrine\Dbal | Nette\Database), if still not exists in project | |
# 3. in application root run this script (which create basic directory sctructure and template for run.php script) | |
# 4. modify file ${DIRECTORY}/run.php with respect your adapter + read DB config setting from yout project | |
# 5. to file ${DIRECTORY}/structures/${DATE}-initDatabase.sql insert actual create scritp of your DB without data | |
# 6. eventually to file ${DIRECTORY}/basic-data/${DATE}-initData.sql add basic data (for exmple any enumeration) | |
# 7. run `/usr/bin/php -f ${DIRECTORY}/run.php structures production-data --init-sql` | |
# 8. output SQL script run on your database |