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
| import psutil | |
| import flask | |
| import argparse | |
| import json | |
| import datetime | |
| app = flask.Flask("ssh-finder") | |
| def makeResponseFromProcess(p): |
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
| # set up directories/permissions # | |
| mkdir -p /var/www/.well-known/acme-challenge/ | |
| chown -R :www-data /var/www/.well-known/ | |
| chmod -R g+x /var/www/.well-known/ | |
| chmod g+rw /var/www/.well-known/acme-challenge/ | |
| # reload nginx # | |
| systemctl reload nginx |
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 default; | |
| location /.well-known/acme-challenge/ { | |
| alias /var/www/.well-known/acme-challenge/; | |
| } | |
| location /{ | |
| return 302 https://$host$request_uri; | |
| } | |
| } |
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
| certbot certonly --webroot \ | |
| -w /var/www \ | |
| -d domain.toplevel \ | |
| -d domain2.toplevel \ | |
| --rsa-key-size 2048 \ | |
| --expand # <-- note this |
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
| # in the templates/template.j2 | |
| <script defer> | |
| $(document).ready(function () { | |
| dt = $('#tableMain').DataTable({ | |
| data : {{ data | safe }}, | |
| colums : {{ colums | safe }} | |
| }); | |
| $('.dataTables_length').addClass('bs-select'); | |
| }); | |
| </script> |
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
| <head> | |
| <script src="/jquery.min.js"></script> | |
| <script defer src="/datatables.min.js"></script> | |
| </head> | |
| <body> | |
| <div id="tableMain"> | |
| </div> | |
| </body> | |
| <script defer> | |
| $(document).ready(function () { |
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
| void UCustomPawnMovementComponent::scaledRotationFromMousePostion(FRotator& scaledRotation, FVector2D mousePosition){ | |
| // ... | |
| } | |
| void UCustomPawnMovementComponent::tickMovement(float deltaSeconds, | |
| float thrust, | |
| float up, | |
| float right, | |
| float rollRight, | |
| UStaticMeshComponent* ship){ |
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
| private: | |
| void scaledRotationFromMousePostion(FRotator& scaledRotation, FVector2D mousePosition); | |
| public: | |
| UFUNCTION(BlueprintCallable, Category = "Custom Movement") | |
| void tickMovement(float deltaSeconds, float thrust, float up, float right, float rollRight, UStaticMeshComponent* ship); |
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
| #include "CoreMinimal.h" | |
| #include "GameFramework/PawnMovementComponent.h" | |
| #include "GameFramework/Pawn.h" | |
| #include "Camera/CameraComponent.h" | |
| #include "Components/StaticMeshComponent.h" | |
| #include "Components/SceneComponent.h" | |
| #include "CustomPawnMovementComponent.generated.h" | |
| /** | |
| * |
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
| location /.well-known/autoconfig/{ | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Forwarded-Proto http; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_pass http://localhost:5014/; | |
| } |
NewerOlder