Skip to content

Instantly share code, notes, and snippets.

@manuel-colmenero
manuel-colmenero / output.txt
Created September 18, 2017 09:50
Dokku user PATH
dokku@vps451130:~$ echo $PATH
/home/dokku/bin:/home/dokku/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin
dokku@vps451130:~$ which nginx
dokku@vps451130:~$ nginx -v
Command 'nginx' is available in '/usr/sbin/nginx'
The command could not be located because '/usr/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with your user account.
nginx: command not found
@manuel-colmenero
manuel-colmenero / vimfifo.sh
Last active October 19, 2015 21:55
Create or use an existing fifo, and read commands from it.
#!/bin/bash
VIMFIFO=$1
if [ ! -p "$VIMFIFO" ]; then
rm -f "$VIMFIFO" && mkfifo "$VIMFIFO"
fi
trap "rm -f '$VIMFIFO'" SIGINT SIGKILL SIGTERM SIGSTOP
@manuel-colmenero
manuel-colmenero / bash-function
Created May 7, 2015 23:14
Tmux scripts sample
rtmux() {
echo -ne "\033]0;mcg@$1\007" # Set window title
ssh $1 -t 'tmux attach -t mcg || tmux -f ~/mcg-tmux.conf --login new-session -s mcg'
}