Multipart form handling should be performant, straightforward, and leave full control of the parsing process to the user, i.e. no surprising magic such as automatic creation of large files and saving anything there by default (although tools/helpers may exist to assist in that too).
import ctypes, sys | |
from ctypes import windll, wintypes | |
from uuid import UUID | |
class GUID(ctypes.Structure): # [1] | |
_fields_ = [ | |
("Data1", wintypes.DWORD), | |
("Data2", wintypes.WORD), | |
("Data3", wintypes.WORD), | |
("Data4", wintypes.BYTE * 8) |
<?php | |
// generate private/public key as follows: | |
// > openssl genrsa -out private.pem 2048 | |
// > openssl rsa -in private.pem -outform PEM -pubout -out public.pem | |
$data = "String to encrypt"; | |
$privKey = openssl_pkey_get_private('file:///path/to/private.pem'); | |
$encryptedData = ""; |
1. Disk cleanup. | |
2. Open run then use the %TEMP% command and delete every file in there. Windows won't delete anything it needs | |
3. Open up run again but this time use the prefetch command and delete everything in this folder. Again, Windows won't delete anything it needs. | |
4. If there's memory issues (Windows telling you you're running out of memory when opening a lot of different apps), increase the virtual memory. For example, if you have 4GB of RAM, do 1024 x 4 so that would be 4096 then take that number and multiply by 2 and get 8192 so initial size would be 8192 and max size would be 91992. | |
5. Run msconfig, go to boot tab, then advanced options, check the number or processors box and then change the number to the number of processors you have. Also check the max memory box. Uncheck anything in startup you don't need as well. |
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
Create the backend for a bootcamp directory website. The frontend/UI will be created by another team (future course). The html/css template has been created and can be used as a reference for functionality. All of the functionality below needs to be fully implmented in this project.
- List all bootcamps in the database
- Pagination
- Select specific fields in result
- Limit number of results
- Filter by fields
Slash commands offer a way to integrate your bot commands directly into the Discord UI. However, these commands are still very limited and cannot replace every use-case for now. I'll explain the limitations and possibilities of this new feature a bit here.
Slash Commands work entirely through the Webhook API. Which introduces a number of moderation issues. See the Moderation section below. It also causes some Rate Limit Problems.
- Simple Q/A type commands that just take an input and return an answer
- Simple commands that have side-effects such as kick/ban/music
<html> | |
<head> | |
<link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" /> | |
<script defer src="https://pyscript.net/latest/pyscript.js"></script> | |
</head> | |
<body> | |
<h1>Some places I have visited over the years:</h1> | |
<div id="folium"></div> | |
<py-config> | |
packages = ["folium"] |