docker build -t YOUR-USER-NAME/YOUR-REPO:<YOUR-IMAGE-TAG> --no-cache --progress=plain .
- Windows 11 running Windows Subsystem for Linux (WSL) version 2 with Debian 11
- NVidia Windows 11 driver installed
- No need to install NVidia Linux driver within WSL (source)
- Open the Debian terminal (e.g., launch Debian from Windows menu)
- Perform distribution update/upgrade
Systemd has its own logging system called the journal, and the log files are stored in /var/log/journal
.
sudo journalctl --disk-usage
- Active journal files will be marked as archived, so that they are never written to in future.
In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc
Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server
Use this link and get $10 free. Just select the $5 plan unless this a production app.
from pdfminer.pdfinterp import PDFResourceManager, process_pdf | |
from pdfminer.converter import TextConverter | |
from pdfminer.layout import LAParams | |
from io import StringIO | |
from io import open | |
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
import csv |
import xlwt | |
def export_xls(model_='User', file_name='export.xls', queryset=None, columns_=None): | |
response = HttpResponse(content_type='application/ms-excel') | |
response['Content-Disposition'] = 'attachment; filename="%s"' % file_name | |
wb = xlwt.Workbook(encoding='utf-8') | |
ws = wb.add_sheet(model_) |
<?php | |
namespace App\Security; | |
use Symfony\Component\HttpFoundation\RedirectResponse; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpFoundation\Session\SessionInterface; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
use Symfony\Component\Routing\RouterInterface; | |
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; |
Moved to git repository: https://github.com/denji/nginx-tuning
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
package main | |
import ( | |
"bytes" | |
"encoding/hex" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" |