Re-organise to use a bare repo
Re-organise to use a bare repo, e.g. https://www.atlassian.com/git/tutorials/dotfiles.
This commit is contained in:
parent
e00d9b2e96
commit
d1da7c6e15
59 changed files with 19 additions and 68 deletions
42
.zsh/configs/functions.zsh
Normal file
42
.zsh/configs/functions.zsh
Normal file
|
@ -0,0 +1,42 @@
|
|||
function m() {
|
||||
if [[ -f .notes/Makefile ]];
|
||||
then
|
||||
make -f .notes/Makefile "$@"
|
||||
else
|
||||
make "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
function mkd() {
|
||||
mkdir -p "$@" && cd "$@"
|
||||
}
|
||||
|
||||
function db {
|
||||
if [ "$1" = "refresh" ]; then
|
||||
mysql -uroot -e "drop database $2; create database $2"
|
||||
elif [ "$1" = "create" ]; then
|
||||
mysql -uroot -e "create database $2"
|
||||
elif [ "$1" = "drop" ]; then
|
||||
mysql -uroot -e "drop database $2"
|
||||
fi
|
||||
}
|
||||
|
||||
is_linux() { [[ "$(uname)" == 'Linux' ]] }
|
||||
is_macos() { [[ "$(uname)" == "Darwin" ]] }
|
||||
|
||||
function composer() {
|
||||
docker run -u $UID -it --rm \
|
||||
-v $(pwd):/app \
|
||||
-v ~/.composer:/root/.composer \
|
||||
-v ~/.ssh:/root/.ssh \
|
||||
composer \
|
||||
composer $*
|
||||
}
|
||||
|
||||
# Run 'phpunit' or 'pest' depending on the project.
|
||||
function p () {
|
||||
vendor/bin/$(phpunit-or-pest) $*;
|
||||
}
|
||||
function pf () {
|
||||
vendor/bin/$(phpunit-or-pest) --filter $*
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue