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| #!/bin/bash | |
| set -euo pipefail | |
| openssl req -new -text -passout pass:abcd -subj /CN=localhost -out server.req -keyout privkey.pem | |
| openssl rsa -in privkey.pem -passin pass:abcd -out server.key | |
| openssl req -x509 -in server.req -text -key server.key -out server.crt | |
| chmod 600 server.key | |
| test $(uname -s) == Linux && chown 70 server.key | |
| docker run -d --name postgres -e POSTGRES_HOST_AUTH_METHOD=trust -v "$(pwd)/server.crt:/var/lib/postgresql/server.crt:ro" -v "$(pwd)/server.key:/var/lib/postgresql/server.key:ro" postgres:12-alpine -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key |
| # Sudo without password | |
| sudo visudo | |
| username ALL=(ALL) NOPASSWD: ALL # At the end of the file | |
| # Get the latest updates | |
| sudo add-apt-repository universe | |
| sudo apt-get update | |
| sudo apt-get -y upgrade | |
| # Manage the repositories that you install |
| import jaydebeapi | |
| # Initiate Java runtiome file location | |
| ucanaccess_jars = [ | |
| "/Users/Danny/Documents/UCanAccess-4.0.2-bin/ucanaccess-4.0.2.jar", | |
| "/Users/Danny/Documents/UCanAccess-4.0.2-bin/lib/commons-lang-2.6.jar", | |
| "/Users/Danny/Documents/UCanAccess-4.0.2-bin/lib/commons-logging-1.1.1.jar", | |
| "/Users/Danny/Documents/UCanAccess-4.0.2-bin/lib/hsqldb.jar", | |
| "/Users/Danny/Documents/UCanAccess-4.0.2-bin/lib/jackcess-2.1.6.jar", |
| #!/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): |
| import os | |
| import sys | |
| import shutil | |
| import logging | |
| class DirectoryCloner: | |
| """ | |
| This class recursively creates a mirrored directory | |
| with the same structure as the directory passed in. |
| #!/usr/bin/env python | |
| """Simple HTTP Server With Upload. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| """ |
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| sudo apt-get update | |
| sudo apt-get install python-pip python-dev ipython | |
| sudo apt-get install bluetooth libbluetooth-dev | |
| sudo pip install pybluez |
| #!/usr/bin/env python | |
| """ | |
| Very simple HTTP server in python. | |
| Usage:: | |
| ./dummy-web-server.py [<port>] | |
| Send a GET request:: | |
| curl http://localhost |
Free O'Reilly books and convenient script to just download them.
Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post
How to use:
download.sh file and put it into a directory where you want the files to be saved.cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.