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
# https://superuser.com/questions/104656/convert-a-pdf-to-greyscale-on-the-command-line-in-floss/164857#164857 | |
gs \ | |
-sOutputFile=output.pdf \ | |
-sDEVICE=pdfwrite \ | |
-sColorConversionStrategy=Gray \ | |
-dProcessColorModel=/DeviceGray \ | |
-dCompatibilityLevel=1.4 \ | |
-dNOPAUSE \ | |
-dBATCH \ |
# simple way to show public IP address of the client | |
# anyone can access it in the browser (like https://ip.example.com) | |
# or can be used in some scripting (like "curl ip.example.com") | |
# simply on NGINX functionality without any kind of additional tools or plugins | |
# just place this nginx config to /etc/nginx/sites-available/ip | |
# make a link in /etc/nginx/sites-enabled/ ($ ln /etc/nginx/sites-available/ip) | |
# reload nginx ($ service nginx reload) | |
server { |
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
#!/usr/bin/env python3 | |
""" | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer | |
import logging | |
class S(BaseHTTPRequestHandler): |
#based on https://towardsdatascience.com/a-beginners-guide-to-building-your-own-face-recognition-system-to-creep-out-your-friends-df3f4c471d55 | |
##install: | |
# pip3 install cmake | |
# pip3 install face_recognition | |
# or pip3 install boost & pip --no-cache-dir install face_recognition | |
# pip3 install numpy | |
# pip3 install dlib | |
# pip3 install opencv-python | |
## |