# Add in ~/.bashrc or ~/.bash_profile | |
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
RED="\[\033[01;31m\]" | |
YELLOW="\[\033[01;33m\]" | |
GREEN="\[\033[01;32m\]" | |
BLUE="\[\033[01;34m\]" | |
NO_COLOR="\[\033[00m\]" |
Many different applications claim to support regular expressions. But what does that even mean?
Well there are lots of different regular expression engines, and they all have different feature sets and different time-space efficiencies.
The information here is just copied from: http://regular-expressions.mobi/refflavors.html
import com.jcraft.jsch.SftpProgressMonitor; | |
import lombok.Getter; | |
import lombok.RequiredArgsConstructor; | |
import lombok.Setter; | |
@RequiredArgsConstructor | |
public class CustomSftpProgressMonitor implements SftpProgressMonitor { | |
private final long totalbytes; |
CTRL + A
: Move the cursor to the beginning of the line
CTRL + E
: Move the cursor to the end of the line
OPTION + Left Arrow
: Move the cursor one word backward
OPTION + Right arrow
: Move the cursor one word forward
Left Arrow
: Move the cursor one character backward
Right Arrow
: Move the cursor one character forward
In order to compile a fully static binary when using Cgo you'll need to link in a C library like musl.
I find it convenient to have a Docker image ready for building these artifacts.
FROM golang
RUN wget https://www.musl-libc.org/releases/musl-1.2.0.tar.gz && \
tar -zf musl-1.2.0.tar.gz && \
cd musl-1.2.0 && \
./configure --enable-static --disable-shared && \