Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
#!/usr/bin/env python3 | |
""" | |
License: MIT License | |
Copyright (c) 2023 Miel Donkers | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer |
socat \ | |
-v -d -d \ | |
TCP-LISTEN:1234,crlf,reuseaddr,fork \ | |
SYSTEM:" | |
echo HTTP/1.1 200 OK; | |
echo Content-Type\: text/plain; | |
echo; | |
echo \"Server: \$SOCAT_SOCKADDR:\$SOCAT_SOCKPORT\"; | |
echo \"Client: \$SOCAT_PEERADDR:\$SOCAT_PEERPORT\"; | |
" |
#!/usr/bin/env bash | |
# | |
# File: | |
# aws-signature-creator.sh | |
# | |
# Description: | |
# A signature creator for AWS signature version 4 | |
# | |
# References: | |
# https://czak.pl/2015/09/15/s3-rest-api-with-curl.html |
I have an updated version of this on my blog here: https://chrisamico.com/blog/2023-01-14/python-setup/.
This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.
/* | |
* Copyright (c) 2023 Russell Harmon | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
Gitlab exports repositories to tar archive which contains .bundle files.
We have repo.bundle file and we want to restore files from it.
git clone --mirror myrepo.bundle my.git
network: | |
version: 2 | |
renderer: networkd | |
bridges: | |
dummy0: | |
dhcp4: no | |
dhcp6: no | |
accept-ra: no | |
interfaces: [ ] | |
addresses: |
server { | |
listen 80; | |
server_name <domain> | |
server_name_in_redirect off; | |
access_log logs/<domain>.access.log; | |
error_log logs/<domain>.error.log; | |
gzip_static on; |