Skip to content

Instantly share code, notes, and snippets.

View LevZaplatin's full-sized avatar
🍀

Lev Zaplatin LevZaplatin

🍀
View GitHub Profile
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml
docker service create
--name traefik
--constraint=node.role==manager
--publish 443:443
--publish 80:80
--publish 8080:8080
--publish 5432:5432
--publish 6222:22
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock
--network test-ctm-net
version: '3.2'
services:
agent:
image: portainer/agent
environment:
# REQUIRED: Should be equal to the service name prefixed by "tasks." when
# deployed inside an overlay network
AGENT_CLUSTER_ADDR: tasks.agent
# AGENT_PORT: 9001

Выведите на экран квадрат из нулей и единиц, причем нули находятся только на диагонали квадрата. Пользователь вводит длину стороны квадрата

python task.py 10

0111111110
1011111101
1101111011
1110110111
1111001111

Определим является ли билет пассажира счастливым или нет.

Назовем автобусный билет несчастливым и вывелем "unlucky", если сумма цифр его шестизначного номера делится на 13.

Назовем автобусный билет счатливым и выведем "lucky", если сумма первых трех цифр равна сумме последних трех цифр.

Если билет одновременно и счастливый и несчастливый - "undefined" 13 % 2 != 2 % 2

Во всех остальных случаях выводим - "regular"

@LevZaplatin
LevZaplatin / create-relative-virtualenv
Last active December 1, 2019 17:33 — forked from chrismaes87/create-relative-virtualenv
bash script to create a relative virtualenv that can be packaged in an rpm
#!/usr/bin/env bash
me=$(basename $0)
set -e # exit on error
function print_help {
echo
echo $me - create a virtualenv with relative paths in a certain buildroot and fix the relative path to make it work after install
echo
echo OPTIONS
@LevZaplatin
LevZaplatin / gpu-info.js
Created July 24, 2024 02:54 — forked from gkjohnson/gpu-info.js
Extracting more detailed GPU information in a browser.
// Extracting more detailed GPU information in a browser.
// NOTE: This won't work with some privacy settings enabled
// and has only been tested with the following return values
// Could be used to guess at a GPUs power using existing benchmarks here:
// https://www.videocardbenchmark.net/GPU_mega_page.html
// https://www.techpowerup.com/gpu-specs/
// http://codeflow.org/entries/2016/feb/10/webgl_debug_renderer_info-extension-survey-results/
// http://www.gpuzoo.com/
// https://docs.google.com/spreadsheets/d/1wGRZ-5sl7G9DhIgwW36g2KnrwVfZqBW7GDKHOd2vbaM/edit#gid=0
@LevZaplatin
LevZaplatin / gpu-info.js
Created July 24, 2024 02:54 — forked from gkjohnson/gpu-info.js
Extracting more detailed GPU information in a browser.
// Extracting more detailed GPU information in a browser.
// NOTE: This won't work with some privacy settings enabled
// and has only been tested with the following return values
// Could be used to guess at a GPUs power using existing benchmarks here:
// https://www.videocardbenchmark.net/GPU_mega_page.html
// https://www.techpowerup.com/gpu-specs/
// http://codeflow.org/entries/2016/feb/10/webgl_debug_renderer_info-extension-survey-results/
// http://www.gpuzoo.com/
// https://docs.google.com/spreadsheets/d/1wGRZ-5sl7G9DhIgwW36g2KnrwVfZqBW7GDKHOd2vbaM/edit#gid=0
Taken from: https://hackerlists.com/hacking-sites/
22 Hacking Sites, CTFs and Wargames To Practice Your Hacking Skills
InfoSec skills are in such high demand right now. As the world continues to turn everything into an app and connect even the most basic devices to the internet, the demand is only going to grow, so it’s no surprise everyone wants to learn hacking these days.
However, almost every day I come across a forum post where someone is asking where they should begin to learn hacking or how to practice hacking. I’ve compiled this list of some of the best hacking sites to hopefully be a valuable resource for those wondering how they can build and practice their hacking skill set. I hope you find this list helpful, and if you know of any other quality hacking sites, please let me know in the comments, so I can add them to the list.
1. CTF365 https://ctf365.com/