I was looking for something like rsync
that I can use on Windows. I know that I could install many of the Linux utilities on Windows but I just wanted to see if there was something built-in. Well...robocopy
!
robocopy source_dir z:\backup\dest_dir /MIR
The /MIR
mirrors the entire directory tree. I'm tempted to say that I actually like it just as much as, or maybe more than, rsync
.
Supported escape sequences:
(Note that escapes are only recognized immediately after newline.)
+--+
| |
| | +--------------------------+
+--------------------------+ | | | |
| | | | | |
| | +-----+--+-----+ | |
| | | | | Remote Machine (C) |
| Local Machine (A) | | | | |
| | | | | |
| | | Jump Server | | |
| | | | | |
| | | (B) | | |
| | | | | |
| | | | | |
| | | | | |
| | | | +--------------------------+
+--------------------------+ | |
+-----+--+-----+
| |
| |
| |
+--+
Machine A can get to Machine B
Machine B can get to Machine C
Machine A CAN NOT get to Machine C directly.
Most people will use SSH to connect from Machine A to Machine B, then use SSH again to connect from Machine B to Machine C.
Add the following to SSH config
Host hostb
User myself
Hostname machineB
Host hostc
User myself
Hostname machineC
Port 22
ProxyCommand ssh -q -W %h:%p hostb
With this configuration, SSH can be used to connect directly from Machine A to Machine C. SSH will automatically direct the connection through Machine B.
I looked around for help on creating an options file for ctags
to work with Scala code. Keeping it here for easy access.
--langdef=scala
--langmap=scala:.scala
--regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private[^ ]*|protected)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\4/c,classes/
--regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private[^ ]*|protected)?[ \t]*object[ \t]+([a-zA-Z0-9_]+)/\4/c,objects/
--regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private[^ ]*|protected)?[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*case class[ \t]+([a-zA-Z0-9_]+)/\6/c,case classes/
--regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private[^ ]*|protected)?[ \t]*case object[ \t]+([a-zA-Z0-9_]+)/\4/c,case objects/
--regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private[^ ]*|protected)?[ \t]*trait[ \t]+([a-zA-Z0-9_]+)/\4/t,traits/
--regex-scala=/^[ \t]*type[ \t]+([a-zA-Z0-9_]+)/\1/T,types/
--regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy|private[^ ]*(\[[a-z]*\])*|protected)[ \t]*)*def[ \t]+([a-zA-Z0-9_]+)/\4/m,methods/
--regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy|private[^ ]*|protected)[ \t]*)*val[ \t]+([a-zA-Z0-9_]+)/\3/l,constants/
--regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy|private[^ ]*|protected)[ \t]*)*var[ \t]+([a-zA-Z0-9_]+)/\3/l,variables/
--regex-scala=/^[ \t]*package[ \t]+([a-zA-Z0-9_.]+)/\1/p,packages/
Use the file by passing it to ctags
ctags --options=ctags_scala --exclude=target --exclude=java-ipv6-master --exclude=tests --exclude=testdata --exclude=Session.vim -R .
I don't remember where I found this but it's quite useful.
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_AUTHOR_NAME="$CORRECT_NAME"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags
Just so I don't forget, here are some notes on using the acme.sh script for SSL/TLS certs.
curl https://get.acme.sh | sh
./acme.sh --install \
--home ~/myacme \
--config-home ~/myacme/data \
--cert-home ~/mycerts \
--accountemail "[email protected]" \
--accountkey ~/myaccount.key \
--accountconf ~/myaccount.conf \
--useragent "this is my client."
Just set the ones you care about.
https://www.howtoforge.com/getting-started-with-acmesh-lets-encrypt-client/
.acme.sh/acme.sh --issue --standalone -d DOMAIN
acme.sh --upgrade [--auto-upgrade]