Skip to content

Instantly share code, notes, and snippets.

@FAUSheppy
FAUSheppy / track_ssh_cwd.py
Created August 27, 2022 12:54
Idea to open remote CWDs via herbstluftwm
import psutil
import flask
import argparse
import json
import datetime
app = flask.Flask("ssh-finder")
def makeResponseFromProcess(p):
@FAUSheppy
FAUSheppy / permission_reload_nginx.sh
Created March 30, 2022 13:43
Set permissions and reload nginx ACME/SSL
# 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
@FAUSheppy
FAUSheppy / ssl-server-nginx.conf
Created March 30, 2022 13:40
Simple nginx-ssl server-block
server{
listen 80 default;
location /.well-known/acme-challenge/ {
alias /var/www/.well-known/acme-challenge/;
}
location /{
return 302 https://$host$request_uri;
}
}
@FAUSheppy
FAUSheppy / certbot.sh
Created March 30, 2022 13:39
Certbot Example
certbot certonly --webroot \
-w /var/www \
-d domain.toplevel \
-d domain2.toplevel \
--rsa-key-size 2048 \
--expand # <-- note this
# 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>
<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 () {
void UCustomPawnMovementComponent::scaledRotationFromMousePostion(FRotator& scaledRotation, FVector2D mousePosition){
// ...
}
void UCustomPawnMovementComponent::tickMovement(float deltaSeconds,
float thrust,
float up,
float right,
float rollRight,
UStaticMeshComponent* ship){
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);
#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"
/**
*
@FAUSheppy
FAUSheppy / well-known-nginx
Created January 31, 2022 13:22
Automx Wellknown example
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/;
}