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
%%$@_$^__#)^)&!_+]!*@&^}@[@%]()%+$&[(_@%+%$*^@$^!+]!&_#)_*}{}}!}_]$[%}@[{_@#_^{* | |
@##&{#&{&)*%(]{{([*}@[@&]+!!*{)!}{%+{))])[!^})+)$]#{*+^((@^@}$[**$&^{$!@#$%)!@(& | |
+^!{%_$&@^!}$_${)$_#)!({@!)(^}!*^&!$%_&&}&_#&@{)]{+)%*{&*%*&@%$+]!*__(#!*){%&@++ | |
!_)^$&&%#+)}!@!)&^}**#!_$([$!$}#*^}$+&#[{*{}{((#$]{[$[$$()_#}!@}^@_&%^*!){*^^_$^ | |
]@}#%[%!^[^_})+@&}{@*!(@$%$^)}[_!}(*}#}#___}!](@_{{(*#%!%%+*)^+#%}$+_]#}%!**#!^_ | |
)@)$%%^{_%!@(&{!}$_$[)*!^&{}*#{!)@})!*{^&[&$#@)*@#@_@^_#*!@_#})+[^&!@*}^){%%{&#@ | |
@{%(&{+(#^{@{)%_$[+}]$]^{^#(*}%)@$@}(#{_&]#%#]{_*({(])$%[!}#@@&_)([*]}$}&${^}@(% | |
(%[@%!}%*$}(*@)}){+@(%@*$&]*^*}*]&$[}*]%]+*}^!}*$^^_()#$^]++@__){&&+((#%+(&+){)$ | |
%&&#($[[+##*%${)_!+{_[})%++)$#))]]]$]@]@($+{&%&%+!!!@]_]+])^*@$(@#${}}#}{%}#+{(@ | |
#__+{{]${]!{(%${%%^)(_*_@+)$]$#_@$)]](}{}$(}*%+!}#+)$%$}+#@*&^{##}+@(%[*@_}{(^]^ |
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
cd <work dir>/<dst repository> | |
git remote add -f <src repository1> <work dir>/<src repository1> | |
git fetch -n <src repository1> | |
git checkout <branch> | |
git branch --set-upstream <branch> <src repository1>/<branch> | |
git merge --no-edit <src repository1>/<branch> | |
git remote rm <src repository1> | |
git remote add -f <src repository2> <work dir>/<src repository2> | |
git fetch -n <src repository2> | |
git branch --set-upstream <branch> <src repository2>/<branch> |
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
cd <work dir> | |
git clone <dst repository url> | |
cd <work dir>/<dst repository> | |
git remote add -f <src repository> <work dir>/<src repository> | |
git merge -m "Merge to the combined repository." <src repository>/master | |
git remote rm <src repository> | |
git push origin master |
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
git filter-branch --index-filter \ | |
'git ls-files -s | sed "s-\t\"*-&myfolder/-" | | |
GIT_INDEX_FILE=$GIT_INDEX_FILE.new \ | |
git update-index --index-info && | |
mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE" | |
' --tag-name-filter cat -f -- --all |
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
git filter-branch --tag-name-filter cat --index-filter 'git rm -r --cached --ignore-unmatch bigfolder' --prune-empty -f -- --all | |
git filter-branch --tag-name-filter cat --index-filter 'git rm --cached --ignore-unmatch somefolder/bigfile.zip' --prune-empty -f -- --all |
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
cd <work dir> | |
git clone <src repository url> | |
cd <work dir>/<src repository> | |
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do | |
git branch --track ${branch##*/} $branch | |
done | |
git remote rm origin |
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
#MAVEN | |
M2_HOME=/opt/apache-maven-3.2.3 | |
export M2_HOME | |
M2=$M2_HOME/bin | |
export M2 | |
PATH=$M2:$PATH | |
export PATH | |
# JAVA |
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 | |
# Flush all current rules from iptables | |
iptables -F | |
ip6tables -F | |
# Allow SSH connections on the following tcp ports | |
iptables -A INPUT -p tcp --dport 22 -j ACCEPT | |
iptables -A INPUT -p tcp --dport 80 -j ACCEPT | |
iptables -A INPUT -p tcp --dport 110 -j ACCEPT |