This file contains hidden or 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
| # Reliable persistent SSH-Tunnel via systemd (not autossh) | |
| # https://gist.github.com/guettli/31242c61f00e365bbf5ed08d09cdc006#file-ssh-tunnel-service | |
| [Unit] | |
| Description=Tunnel for %i | |
| After=network.target | |
| [Service] | |
| User=tunnel | |
| ExecStart=/usr/bin/ssh -o "ExitOnForwardFailure yes" -o "ServerAliveInterval 60" -N tunnel@%i |
This file contains hidden or 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
| [Unit] | |
| Description=SoftEther VPN Server | |
| After=network.target | |
| [Service] | |
| Type=forking | |
| ExecStart=/usr/local/vpnserver/vpnserver start | |
| ExecStop=/usr/local/vpnserver/vpnserver stop | |
| ExecStartPost=/bin/sleep 5 | |
| ExecStartPost=/bin/bash -c "/bin/systemctl set-environment dev=$(ip addr | grep tap_ | sed 's/^.*: \(tap_.*\):.*$/\1/g')" |
This file contains hidden or 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
| /* | |
| This script, when used with Google Apps Scripts, will delete 400 emails and | |
| can be triggered to run every few minutes without user interaction enabling you | |
| to bulk delete email in Gmail without getting the #793 error from Gmail. | |
| Google returns a maximum of 500 email threads in a single API call. | |
| This script fetches 400 threads in case 500 threads is causing timeouts | |
| Configure the search query in the code below to match the type of emails | |
| you want to delete |
This file contains hidden or 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
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # Python script to find the largest files in a git repository. | |
| # The general method is based on the script in this blog post: | |
| # http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ | |
| # | |
| # The above script worked for me, but was very slow on my 11GB repository. This version has a bunch | |
| # of changes to speed things up to a more reasonable time. It takes less than a minute on repos with 250K objects. | |
| # |
This file contains hidden or 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
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /home/website/web; | |
| rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
| try_files $uri @rewriteapp; | |
| location @rewriteapp { |