mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-21 19:11:30 +01:00
cleanup
This commit is contained in:
parent
4a985b2ffa
commit
b8d56ee083
15
README.md
15
README.md
|
@ -91,20 +91,7 @@ in your `.zshrc`. This requires antibody installed.
|
||||||
color $Red "This will be printed in red"
|
color $Red "This will be printed in red"
|
||||||
color $Yellow "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.
|
4. `git fixup` (`git-fixup`) to create a fixup command and immediately rebase it
|
||||||
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/`
|
|
||||||
|
|
||||||
5. Many more. Use `list_functions` to list defined functions and a small description
|
5. Many more. Use `list_functions` to list defined functions and a small description
|
||||||
|
|
||||||
### Files/Folders
|
### Files/Folders
|
||||||
|
|
|
@ -44,13 +44,6 @@ function calc
|
||||||
awk "BEGIN { print $* }"
|
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
|
## Print full path of item in current directory
|
||||||
function ppath
|
function ppath
|
||||||
{
|
{
|
||||||
|
@ -105,12 +98,7 @@ function httpserver
|
||||||
echo "Starting webserver in $PWD/"
|
echo "Starting webserver in $PWD/"
|
||||||
fi
|
fi
|
||||||
open "http://localhost:8000" &>/dev/null &
|
open "http://localhost:8000" &>/dev/null &
|
||||||
if [[ "$(command -v python3)" ]]; then
|
python -m http.server 8000
|
||||||
python=python3
|
|
||||||
else
|
|
||||||
python=python
|
|
||||||
fi
|
|
||||||
$python -m http.server 8000
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
alias webserver='httpserver'
|
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
|
## List defined functions in $DOTFILES/functions.sh
|
||||||
function list_functions
|
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'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user