1. sshfs

    Mount a folder remotely

    I like sshfs the secure shell filesystem. But sometimes I forget how the unmounting command is, so I write this short note to myself.

    The mounting part is intuitive:

    sshfs HOST:PATH mountpoint
    

    It mounts the given path from the given host to the given mountpoint …

    read more
  2. X-forwarding combined with sudo

    X11 forwarding combined with sudo

    Unfornunately I have no better solution found for X-forwarding and sudoing afterwards, yet.

    This solution is insecure, but works as a dirty hack.

    user:~$ xauth list | grep unix$(echo $DISPLAY | cut -c10-12) > /tmp/xauth
    user:~$ sudo -s
    root:~# xauth add $(cat /tmp/xauth)
    root …
    read more
  3. Calculate im Vim

    If one wants to calculate in vim one simply has to write the following line:

    2 pi mult
    

    and visually select it with V then pass it to rpnl or calc or bc or so via xargs

    :!xargs rpnl
    

    to get the result in the line.

    This trick also works …

    read more

links

social