This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Function GetURL(c As Range) As String | |
On Error Resume Next | |
If Len(c.Hyperlinks(1).SubAddress) = 0 Then | |
GetURL = c.Hyperlinks(1).Address | |
Else | |
GetURL = c.Hyperlinks(1).Address & "#" & c.Hyperlinks(1).SubAddress | |
End If | |
End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Rsync archive with delaying deletion | |
# Sample command: rsync_awdd.sh -s /home/kaspim -d /mnt/backup/home/kaspim -t /mnt/backup/trash/kaspim -a 90 | |
while [ ! $# -eq 0 ] | |
do | |
case $1 in | |
--help | -h) | |
echo "rsync_awdd.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MikroTik Hairpin NAT with IP address preserve of the incoming connection (for fail2ban etc.) | |
/ip firewall address-list | |
add address=192.168.0.0/24 list=LAN | |
/ip firewall nat | |
add action=masquerade chain=srcnat dst-address=!192.168.0.1 src-address-list=LAN dst-address-list=LAN | |
add action=dst-nat chain=dstnat dst-address-type=local dst-port=80 protocol=tcp src-address-list=LAN to-addresses=192.168.0.2 to-ports=80 | |
add action=dst-nat chain=dstnat dst-port=80 in-interface-list=WAN protocol=tcp to-addresses=192.168.0.2 to-ports=80 | |
add action=dst-nat chain=dstnat dst-address-type=local dst-port=443 protocol=tcp src-address-list=LAN to-addresses=192.168.0.2 to-ports=443 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Multiple Git repositories for same project and tip for Git command aliases | |
# Add second remote | |
git remote add origin git@gitlab.com:kaspim/test.git | |
git remote add github git@github.com:kaspim/test.git | |
# Examples of Git global aliases | |
git config --global alias.pushall '!git remote | xargs -L1 git push --all' | |
git config --global alias.pullall '!git remote | xargs -L1 git pull --all' | |
git config --global alias.fetchall '!git remote | xargs -L1 git fetch --all' |