1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-21 19:11:30 +01:00
This commit is contained in:
bretello 2021-10-09 00:18:10 +02:00
parent 4a985b2ffa
commit b8d56ee083
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
2 changed files with 3 additions and 42 deletions

View File

@ -91,20 +91,7 @@ in your `.zshrc`. This requires antibody installed.
color $Red "This will be printed in red"
color $Yellow "This will be printed in red"
4. `mecp` to copy files back to the machine from wich you are ssh-ing.
For this to work an ssh tunnel with `Remoteforward` is needed:
ssh -R 22:localhost:2222 YOURHOSTNAMEHERE
or specify this in `~/.ssh/config` for a persistent configuration:
Host YOURHOSTNAMEHERE
Remoteforward 2222 localhost:22
This can be enabled in `~/.ssh/config` globally for all hosts by uncommenting the relevant `Host * Remoteforward`.
You might have to manually edit the username in the `mecp` definition in `functions.sh` if this is
different between the two machines. `mecp` copies by default on the local machine on `~/Desktop/`
4. `git fixup` (`git-fixup`) to create a fixup command and immediately rebase it
5. Many more. Use `list_functions` to list defined functions and a small description
### Files/Folders

View File

@ -44,13 +44,6 @@ function calc
awk "BEGIN { print $* }"
}
## Make new directory and cd to that directory. Usage: mcd newfolder
function mcd
{
mkdir -p "$1"
cd $1
}
## Print full path of item in current directory
function ppath
{
@ -105,12 +98,7 @@ function httpserver
echo "Starting webserver in $PWD/"
fi
open "http://localhost:8000" &>/dev/null &
if [[ "$(command -v python3)" ]]; then
python=python3
else
python=python
fi
$python -m http.server 8000
python -m http.server 8000
)
}
alias webserver='httpserver'
@ -171,24 +159,10 @@ function genpwd
}
if [[ "$(uname)" == "Darwin" ]]; then
## Copy output of previous command to termbin.com (command line pastebin) and put in in clipboard
function termbin
{
nc termbin.com 9999 | pbcopy && echo -n "$(pbpaste) --> in clipboard"
}
else
## Copy output of previous command to termbin.com (command line pastebin)
function termbin
{
nc termbin.com 9999
}
fi
## List defined functions in $DOTFILES/functions.sh
function list_functions
{
grep --color=no -A 1 '^##' $DOTFILES/functions.sh | sed -E 's/function (.*)/\1/g'
grep --color=no -A 1 '^##' $DOTFILES/functions.zsh | sed -E 's/function (.*)/\1/g'
}