This file contains hidden or 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 | |
| iftttkey="" | |
| iftttevent="" | |
| if [ "$3" = "0000000000000000000000000000000000000000" ]; then | |
| type=delete | |
| else | |
| type=$(git cat-file -t $3) | |
| fi |
This file contains hidden or 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 home='cd /c/OSPanel/domains/' | |
| alias ls='ls -alh --color=auto' | |
| alias g-pull='git pull origin master' | |
| alias g-push='git push origin master' | |
| # Code review | |
| g-review() { | |
| if [ "$1" = "" ]; then | |
| echo Ex. review issues1234 | |
| else |
This file contains hidden or 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
| <?php | |
| /* header menu */ | |
| register_nav_menu("menu", "Main menu"); | |
| /* footer menu */ | |
| register_nav_menu("menu_footer", "Footer menu"); | |
| /* thumbnails */ | |
| add_theme_support('post-thumbnails'); |
This file contains hidden or 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
| <?php | |
| /** | |
| * Class Bitrix24 | |
| * @author [email protected] | |
| * @gist https://git.io/fj9nH | |
| */ | |
| class Bitrix24 { | |
| /** |
This file contains hidden or 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
| image: jimmyadaro/gitlab-ci-cd:latest | |
| before_script: | |
| - mkdir -p ~/.ssh | |
| - echo "$PRIVATE_KEY" > ~/.ssh/id_rsa | |
| - chmod 700 ~/.ssh | |
| - chmod 600 ~/.ssh/id_rsa | |
| - eval $(ssh-agent -s) | |
| - ssh-add ~/.ssh/id_rsa |
This file contains hidden or 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
| root = true | |
| [*] | |
| charset = utf-8 | |
| end_of_line = lf | |
| indent_size = 4 | |
| indent_style = space | |
| insert_final_newline = false | |
| max_line_length = 120 | |
| tab_width = 4 |
This file contains hidden or 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
| # gen ed25519 | |
| ssh-keygen -o -a 100 -t ed25519 | |
| # gen strong rsa | |
| ssh-keygen -t rsa -b 4096 -o -a 100 | |
| # new passphrase | |
| ssh-keygen -f ~/.ssh/id_rsa -p -o -a 100 | |
| # ssh-agent |
This file contains hidden or 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
| current_dir=$PWD | |
| echo "Finding repositories in $current_dir" && echo | |
| for repo in `find ${current_dir} | grep ".git$"` | |
| do | |
| echo "Repository ${repo%.git} size `du -hcs ${repo} | grep 'total\|итого'`" | |
| cd ${repo%.git} && git gc > /dev/null 2>&1 | |
| echo "Size after optimization `du -hcs ${repo} | grep 'total\|итого'`" && echo | |
| cd ${current_dir} | |
| done |
This file contains hidden or 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
| # Удалить все ветки кроме master | |
| git checkout master && git branch | grep -v "* master" | xargs git branch -D |