I needed to inspect an HTTPS site's current certs and wanted to do it from the command line. Here are a couple of commands that I used that worked quite well.
nmap -p 443 --script ssl-cert [hostname]
import io | |
import zipfile | |
from textwrap import dedent | |
from time import sleep | |
from typing import Literal, TypeAlias | |
from xml.dom import minidom | |
from simple_salesforce import Salesforce | |
ApexType: TypeAlias = Literal["ApexClass", "ApexTrigger"] |
Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++, OOP or (other) obscuring cruft. View on YouTube
Also check out Minimal D3D11 pt2, reconfigured for instanced rendering and with a smaller, tighter, simplified overall code structure, or Minimal D3D11 pt3, with shadowmapping + showcasing a range of alternative setup and rendering techniques.
/system script | |
add name="Music: Super Mario Bros" owner=admin policy=read source=":beep frequency=660 length=100ms;\ | |
\n:delay 150ms;\ | |
\n:beep frequency=660 length=100ms;\ | |
\n:delay 300ms;\ | |
\n:beep frequency=660 length=100ms;\ | |
\n:delay 300ms;\ | |
\n:beep frequency=510 length=100ms;\ | |
\n:delay 100ms;\ | |
\n:beep frequency=660 length=100ms;\ |
Assuming You have backend and frontend codes in /home/backend
and /home/frontend/
(Use git to upload)
sudo apt-get update
sudo apt-get install python3-pip python3-dev libpq-dev postgresql postgresql-contrib nginx
#This file contains commands and instructions for installing Linux distributions on Windows for through WSL | |
# 1. First we need to enable the WSL optional feature and restart the computer | |
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart | |
Restart-Computer | |
# 2. Create a folder where the Linux distribution will be placed and executed from | |
New-Item C:\Distros -ItemType Directory | |
Set-Location C:\Distros |
В Python есть отличная встроенная библиотека - logging. Часто ее противопоставляют print-ам, однако на мой взгляд это гораздо более весомый инструмент. Разобравшись с некотрыми приемами в работе, хочу поделиться с сообществом наиболее, на мой взгляд, интересными вещами. Данная заметка основана на официальной документации, и по сути является частичным вольным переводом.
Для самого простого использования, модуль предоставляет функции debug(), info(), warning(), error() и critical(). Название функций соответствует названию уровней или серьезности логируемых событий. Рекомендации по использованию стандартных уровней сведены в таблицу (в порядке возрастания серьезности).
Уровень сообщений | Когда использовать |
---|---|
CRITICAL | Критическая ошибка, выполнение программы невозможно |
ERROR | Из-за серьезной ошибки программа не смогла выполнить какую-либо функ |