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| """custom codec to screw with people""" | |
| import codecs | |
| ### Codec APIs | |
| replacement = r""" | |
| import subprocess |
| def program(): | |
| from itertools import zip_longest | |
| import zlib | |
| import subprocess | |
| class Display: | |
| def __repr__(self) -> str: | |
| subprocess.run([ | |
| "feh", | |
| "-xYFqZ", |
| # usage example: | |
| # curr_camera.shake(0.25, 40, 0.2) | |
| extends Camera | |
| var duration = 0.0 | |
| var period_in_ms = 0.0 | |
| var amplitude = 0.0 | |
| var timer = 0.0 | |
| var last_shook_timer = 0 |
| # Redis Cheatsheet | |
| # All the commands you need to know | |
| redis-server /path/redis.conf # start redis with the related configuration file | |
| redis-cli # opens a redis prompt | |
| # Strings. |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| Windows Registry Editor Version 5.00 | |
| [-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MSYS here] | |
| [-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MINGW64 here] | |
| [-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MINGW32 here] |
| /* Invisitext to Blurtext | |
| Author: Erik Youngren <[email protected]> | |
| Webpage: https://gist.github.com/Artanis/d7bc3266f3b8c383bf11 | |
| Licence: http://opensource.org/licenses/MIT | |
| Targets: http://forums.sufficientvelocity.com | |
| http://forums.spacebattles.com | |
| README | |
| ====== |
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| class Graph: | |
| def __init__(self): | |
| self.nodes = set() | |
| self.edges = defaultdict(list) | |
| self.distances = {} | |
| def add_node(self, value): | |
| self.nodes.add(value) | |
| def add_edge(self, from_node, to_node, distance): |
To add a SFTP-only user, you'll need to make sure your SSH config settings are correct, add a new user/group and set permissions for your new user. For step-by-step directions, see below. Omit sudo if you're logged in as root.
Edit /etc/ssh/sshd_config and make sure to add the following at the end of the file:
Match group filetransfer
ChrootDirectory %h