Signed-off-by: Arija A. <ari@ari.lt>
This commit is contained in:
2025-10-23 20:36:41 +03:00
parent f6a80c9c4f
commit caf4ac7c06
107 changed files with 3327 additions and 2147 deletions

13
.eslintrc.js Normal file
View File

@@ -0,0 +1,13 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
}
}

View File

@@ -1,41 +0,0 @@
on:
push:
paths:
- "pages/**"
- "blog/**"
- "sitemap.sh"
- "index.xhtml"
jobs:
stats:
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GIT_TOKEN }}
- name: Set up repository
run: |
git reset --hard
git pull
git reset --hard
- name: Generate sitemap
run: |
sh ./sitemap.sh
- name: Stage the changes
run: |
git add sitemap.xml
- name: Commit and Push Changes
run: |
if git diff --staged --quiet; then
echo "No changes to commit."
else
git config --local user.email "sitemap@localhost"
git config --local user.name "Sitemap CI/CD"
git commit -am "[skip ci] Update sitemap" || echo "No changes to commit"
git push origin HEAD -f
fi

174
.gitignore vendored
View File

@@ -1,3 +1,171 @@
files
guides/xmpp
/blog/posts/2025/why-i-don't-like-nicotine-pouches.xhtml
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
# Databases
*.db
# Other
.ccls-cache/
!py.typed
.key
*.wasm

4
.prettierrc Normal file
View File

@@ -0,0 +1,4 @@
{
"singleQuote": false
}

View File

@@ -1,52 +0,0 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGaE3vkBEADykpF/yUW3bWN7mnQLQPWZBC/OOuBoSW8X7DoicPBd/fV2vNWW
t+M7UY0NUZQkyvVaj1EVLY7A0Y+SPoonPqcFvme4Z6waC5fYUEn34OTR1/4/epTy
0vXLm0HHylvMk/Fxf4uf/vXDfOamwuWoWWIvaQNPbacCwDdhwEiTSPgpeLNSUBcW
1jdsf4FCvyZeFTBi889TyF3qICok7XHkZCW3pNcGEu5tn3+OK4DCsL93lSOK/rwf
sLESt2d5Qny+mXDn6acSk7/DhjuYp6NX3hJpK74NuthMXJUWPtI/GJv40siQ0+sI
uFTEsm3I1oWeEy2txw7uMeJOJIVph+IJNxq2m7msB9ubJNlatFBpZsFa4cORrs60
KRIHhRCTJLSUIO07voTZ1vmpgJfqC4v1BROqZJHRyFYEhGbr80CANVPuwYbkAmTQ
VXHNNEg3i65PEu5iBqBz6ZPc17wX5hwtfehaDSftwV30hMxpVkVcmyAwltGfXOjn
2JOEai1i/vO8ytKNGpX1QeGuqWTE5pBWcCWq0LUQyibNJvrLVJ3XWhY1hR6icJUo
yfqB0iqoj2ykaBxEYR0xP4/hQ76DB+hXROH78Okp27B4p2EKaP92UQJhg2IMeqRP
+kbs0DGYFTYdie9wDXOhmmBVTmnHqOlNNICQCDrCXakESQgAgeNjWOVepwARAQAB
tB1BbGVrIDxwdXJwbGVib3JlZEBwb3N0ZW8uY29tPokCVwQTAQgAQRYhBAy1JpDN
ZEQT72aiHK7y+ajAM0ZwBQJmhN75AhsDBQkFxNInBQsJCAcCAiICBhUKCQgLAgQW
AgMBAh4HAheAAAoJEK7y+ajAM0ZwDxoQAOq+441ALQg8kZSGSvkcxzZIOWCXFgtV
Ym8zFzB70mnkLD7wTN/mZJQow1bTdDeu2h1KzhrGhfR5a1meOCxMU7XtRPWUSVp/
1g4d0J80rivyXajnvbDkcyiBlHv780eKhgZuXkCiDKzXEdHnqMOv2qK0PeubKqso
fiULDZjjzsQUP2WF8oom7j8Z50zT4LvNL+pe6jfv1sj0keaF84DOS6tWb/qtzo8P
Y6V+ndyuDsWj9FDHRHAqYMg6jIlyq5KFvNwY5rQN/EvO3Ra0jQQLFN0w/GoYUtLw
WZbolJyWyxPoMbDhPP4ZdqUC7UQwEoTTFD8p2oT9jInoBt2GFgK4x0NpehuWMQj2
d0WAh8EV9jU37Sq2dMoAdruHLK1MaxgCwCSEdKuDV8nZnYxQrXnFN5+qYuvFGvWj
vkwipeHGFcjRFAljLi4o+WyrkOWFE/ZO9WhiaeSoDqpRc5l+DsBjFIWvjBhU6Gh8
4CgtnygfHJPRwoOdbeR1a6xmKXrJ4FkXz8zGgNzdwqLAZzA1Zt4T0JYHDsOW0Ru3
3RS+XvUVItWgDyKl+8EWdPqX4cqK5jnGWtrf78ft18H+F/JBQg1Ks74vDxANBASW
HWsjjjm5ueMtgeR6i0gPa4Dlwkz6K88Ssx2o5rEkcE+V3gKPjHQ9+nGkDKaUTPsI
Tre6Ti8c7tFfuQINBGaE3vkBEADnahL3uK7iFPZCAJtMRm3GyClWojxtLhPL5BQB
7qv1G8jO/NABR7VLeDGXfkli9WSH6Dd3YMvN+RwFIHkZOpGhdNNnUmx7UOpk19qo
09Sb9pt82tC3+gGDbnNbLBOwgKOFEP3A/sVyhg3x3UdDLbfxMp5Wo4omZldjdDP+
xr1xr+zfoRojXLdq3+9c2DUuhCcwpbfEveMruR50qRZHhNafwj+oRk2lalOKRLvf
KqQ1m/rDVQTCQZNZpBpOqs1FzWj3GgyynoJ8g3UaxhfX0mP5HTPky9+vyjU/Qf7u
/i9f3fmpDgQrBLwP+9QHXMVPHW6XQY6NlThqeX9MZ36mLnmWOFLSPxEno1m9ke4v
C6VR9Qnz7ofK6Ia4xWrjdA70hrFNEzlV3n58Zp+K05eAoXXx8arj2yco/BusZMau
Z4WmD4k/O4rQWcJHo/NuupkgvsuKWu4JdYouP46PhVkH05hzEObgqh0ToapNhDh+
7+UYFRVqmnBe/G1U6kLDKHae/S//iidJxwxG9yqbhJFcSr/on22vOoGdI/ddprcI
zyVxbBbsPdKAMuHizjj6bLmthcYlWdclEkM7Xp0PWv2iZ6tTt5Ptj3Tg7Jm9CfWK
Efwe23kSr9NIzokHcPKyDgX7AJe6i8bz90S3/EVyslF2EzaA2dY4QDBvpFrIPYDj
Uh8jawARAQABiQI8BBgBCAAmFiEEDLUmkM1kRBPvZqIcrvL5qMAzRnAFAmaE3vkC
GwwFCQXE0icACgkQrvL5qMAzRnDikw/9G95ftdCwtFzujW0FXk4D0tfxfk694/4k
Edt3dZ5cGyMjQbwf9O6FMvkvTIwL9izy9kBcRDNE/2nXFBsEInpE2C3vYKW8aoYV
qYZdYtNyRBX59x7Aq40NHqBlWuVLHXJGp81RZEiZW4rX9TmxXrW1aH/cC2KUtMgP
L6IqsDy3O6bKklDH+zYOk/V0En6JK4P3DsxEx084IiF/8vbMs7dMa9cdfQ3dm/xt
grCrMmwZL9Y+NCkTycpQxncFMjg9J12XLzMacMfrILZuiRKvwsRuXkDrP9m+4Z5Z
t6a6hFu74iCxWebJ9YAKbbHzzr/WB0/F1P3HEG2Djjspbim6RHSaYeRQtMv5Hai3
1Rpi35nq42e1nTXHiwqwftOeRoYLTzG93MUaPwQxszWbQH6iNTB2wLRN0Xy8JNK/
UtwsOn3tuFgqgWWwtEoNrhAn+kP+besKPV5sqDH/GBb1C9yL7qzrLC93wraPn1CY
pbERnblU66hNa+WWMVCF4W3UUIC452FfSjp003CvyRk6ukgqdNeaaJBe9VErjfLd
4fu0nkuV19w0qL5sij+Tjq0SV6f1vJW3L427iG6+d8VM+1tOqifsFDdBNVOkH/HD
ETvMCC7CZ1tS4WhF5h6zSW1R8u4auY97dJdGIQtfwzexKqnNo5gsYik8NU0onmJf
KyoBhwIfl1o=
=qhIS
-----END PGP PUBLIC KEY BLOCK-----

794
LICENSE
View File

@@ -1,203 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
Preamble
1. Definitions.
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
The precise terms and conditions for copying, distribution and
modification follow.
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
TERMS AND CONDITIONS
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
0. Definitions.
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
"This License" refers to version 3 of the GNU Affero General Public License.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
A "covered work" means either the unmodified Program or a work based
on the Program.
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
1. Source Code.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
How to Apply These Terms to Your New Programs
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
Copyright [yyyy] [name of copyright owner]
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
http://www.apache.org/licenses/LICENSE-2.0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.

108
README.md
View File

@@ -1,21 +1,97 @@
## purplebored.pl
# Flask template
Welcome to my personal website, located at https://purplebored.pl ! <br>
This is a simple and goofy website that serves as my personal space on the internet. (Such fancy wording ik)
> Simple flask template
### License Information
Licensed under the [Apache License, Version 2.0](LICENSE)
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
## Running
http://www.apache.org/licenses/LICENSE-2.0
First compile WASM PoW:
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. For the full licene chcek out the LICENSE file
(So much yap abt a license ong)
```sh
cd src/static/js/wasm
./compile.sh
cd ../../../../
```
### Contributing
If you want to conrtibute something to my site just creating a issue first would be ideal!
Then:
```sh
python3 -m venv venv
source venv/bin/activate
source .env # see example.env
pip install --upgrade -r requirements.txt
cd src
memcached -d
# If you remove migrations/:
# flask db init
# vim migrations/script.py.mako (add import flask_app)
# flask db migrate -m 'Initial migration'
flask db upgrade
flask run
```
For production use a WSGI server such as [Gunicorn](https://pypi.org/project/gunicorn/):
```sh
python3 -m venv venv
source venv/bin/activate
source .env # see example.env
pip install --upgrade -r requirements.txt
pip install --upgrade gunicorn
cd src
memcached -d
flask db upgrade
python3 -m gunicorn -b 127.0.0.1:12345 -w 4 app:app # ... Or whatever your configuration is
```
## I don't want a generic `flask_app` module name
Run `python3 rename.py <new_module_name>`, for example, `python3 rename.py my_app` :)
## I need custom subcommands
In `src/flask_app/__init__.py` you can register your custom `flask` subcommands using `click`:
```py
import click
import flask
@click.command("hello")
def cmd_hello() -> None:
"""Print hello"""
print("Hello!")
def create_app(name: str) -> flask.Flask:
...
app: flask.Flask = flask.Flask(name)
...
# Commands
app.cli.add_command(create_counter)
...
return app
```
If you have a lot of custom commands it is advised you move your commands to a file called `commands.py` or alike, then register them as usual using `app.cli.add_command`. To run these subcommands you would simply do
```sh
flask hello
```
Or whatever your custom subcommand is.
## Linting and Formatting
Use the following tools:
- Black: <https://pypi.org/project/black/>
- Isort: <https://pypi.org/project/isort/>
- Pyright: <https://pypi.org/project/pyright/>
- Flake8: <https://pypi.org/project/flake8/>
- Mypy: <https://pypi.org/project/mypy/>

View File

@@ -1,137 +0,0 @@
body {
background-color: #000000;
margin: 0;
height: 100;
overflow-x: hidden;
display: flex;
flex-direction: column;
min-height: 100vh;
}
@font-face {
font-family: IBMWeb;
src: url('/assets/fonts/ibm9x16.woff') format('truetype');
}
/* Ascii logo */
.ascii-logo {
font-family: monospace;
white-space: pre;
color: #a57ae9;
top: 50px;
}
/* End of Ascii logo */
/* The main content of the website */
.content1 {
margin-left: 20px;
margin-right: 20px;
font-family: IBMWeb, Liberation Mono, monospace;
background-color: #000000;
color: #a57ae9;
font-size: 1.0em;
white-space: normal;
}
/* End of the main content of the website */
/* You may ask yourself why are there two identical css sections. */
.content2 {
margin-left: 20px;
margin-right: 20px;
font-family: IBMWeb, Liberation Mono, monospace;
white-space: normal;
color: #a57ae9;
font-size: large;
}
/* Very easy one is for articels or just post idk how to call them and the content1 thing if for general usage */
/*Code to make footer look cool and ncie :D*/
.footer {
font-family: IBMWeb, Liberation Mono, monospace;
text-align: center;
margin-top: auto;
padding: 1em;
color: white;
text-decoration: none;
background: transparent;
}
/* End of the code which makes the footer look nice :( */
/* Makes hyperlinks not look like shit */
a {
text-decoration: none;
color: #447fc6;
}
/* Underlines the hyperlinks */
::selection {
color: #000000;
background: #a57ae9
}
a::selection {
color: #000;
background: #447fc6
}
a:not(:has(img)):hover {
text-decoration: underline
}
/* End of the code which makes hyperlink usable */
/* The Css for the article website */
.article {
margin-left: 35px;
margin-right: 35px;
font-family: monospace;
color: #a57ae9;
font-size: small;
}
/* CSS to make the guides look nice. */
.ascii-logo2 {
font-family: monospace;
white-space: pre;
color: #a57ae9;
top: 50px;
}
.error {
margin: 0 auto;
text-align: center;
font-family: monospace;
white-space: pre;
color: #a57ae9;
}
.snuff-warning h4 {
margin-left: 20px;
margin-right: 20px;
font-family: Arial, serif;
font-size: 16pt;
font-weight: bold;
text-transform: uppercase;
text-align: center;
border: 1mm solid black;
padding: 4px;
margin-bottom: 1em;
}
.snuff-warning ul {
margin-left: 20px;
margin-right: 20px;
list-style-type: none;
padding-left: 0;
margin-left: 0;
}
.snuff-warning input[type="checkbox"] {
margin-left: 20px;
margin-right: 6px;
}
.blog ul {
list-style-type: none;
padding-left: 0;
margin-left: 0;
}

View File

@@ -1,21 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>401</title>
<link rel="icon" href="/favicon.png" />
<link rel="stylesheet" href="/assets/css/style.css" />
</head>
<body>
<div class="error">
_ _ ___ _
| || | / _ \/ |
| || |_| | | | |
|__ _| |_| | |
|_| \___/|_|
401 - Unauthorized
<a href="/index.xhtml">Go home!</a>
</div>
</body>
</html>

View File

@@ -1,21 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>403</title>
<link rel="icon" href="/favicon.png" />
<link rel="stylesheet" href="/assets/css/style.css" />
</head>
<body>
<div class="error">
_ _ ___ _____
| || | / _ \___ /
| || |_| | | ||_ \
|__ _| |_| |__) |
|_| \___/____/
403 - Forbidden
<a href="/index.xhtml">Go home!</a>
</div>
</body>
</html>

View File

@@ -1,21 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>404</title>
<link rel="icon" href="/favicon.png" />
<link rel="stylesheet" href="/assets/css/style.css" />
</head>
<body>
<div class="error">
_ _ ___ _ _
| || | / _ \| || |
| || |_| | | | || |_
|__ _| |_| |__ _|
|_| \___/ |_|
404 - Not Found
<a href="/index.xhtml">Go home!</a>
</div>
</body>
</html>

View File

@@ -1,21 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>500</title>
<link rel="icon" href="/favicon.png" />
<link rel="stylesheet" href="/assets/css/style.css" />
</head>
<body>
<div class="error">
_ _ ___ _____
| || | / _ \___ /
| || |_| | | ||_ \
|__ _| |_| |__) |
|_| \___/____/
500 - Internal Server Error
<a href="/index.xhtml">Go home!</a>
</div>
</body>
</html>

View File

@@ -1,21 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>502</title>
<link rel="icon" href="/favicon.png" />
<link rel="stylesheet" href="/assets/css/style.css" />
</head>
<body>
<div class="error">
____ ___ ____
| ___| / _ \___ \
|___ \| | | |__) |
___) | |_| / __/
|____/ \___/_____|
502 - Bad gateway
<a href="/index.xhtml">Go home!</a>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -1,3 +0,0 @@
uhh hi! as you can see my error thingy is far from being done. This is just a temporay file to let you know if you for whatever reason are here.
have a good day/night

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1001 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 965 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

View File

@@ -1,48 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content="Purpleblog" />
<meta name="og:description" content="Purplebored's blog" />
<meta name="description" content="Purplebored's blog" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact, blog, nasal snuff, tobacco, Personal Wesbite, niko, joe camel" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=Purpleblog=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content2" style="text-align: center;">
<h1>=== Purpleblog ===</h1>
<p>
Hello and welcome to my "new" blog. I used to use htmly but decided to stop using it since I had some issues with it. It was nice to write the blogs but the expireince for the user was mediocre at best. At least in my opinion.
Well the blogs on here will be exactly the same as on blog.purplebored.pl just written manually by hand in xhtml. This is overall the better option and it will make my blog aviable over ygg, tor, and i2p.
</p>
<div class="blog">
<h3>Posts:</h3>
<ul>
<li><a href="/blog/posts/2025/blog-future.xhtml">The future of my blog.</a> </li>
<li><a href="/blog/posts/2025/snuff-review-2-ozona-r-type-snuff.xhtml">My Review of the Ozona R-type Snuff</a> </li>
<li><a href="/blog/posts/2025/snuff-review-1-red-bull-snuff.xhtml"> My Review of the Red Bull Snuff </a> </li>
<li><a href="/blog/posts/2025/my-review-of-the-minecraft-movie.xhtml">My Review of the Minecraft Movie</a> </li>
</ul>
<br />
</div>
<h3><a href="/index.xhtml">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

View File

@@ -1,44 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content=" Future of my blog " />
<meta name="og:description" content=" I discuss here the future of my blog " />
<meta name="description" content=" I discuss here the future of my blog " />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact, blog, nasal snuff, tobacco, Personal Wesbite, niko, joe camel" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=The future of my blog=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content2" style="text-align: center;">
<h1>=== The future of my blog ===</h1>
<p>
Alright I gonna be honest. I don't think I am going to write any blogs anymore. The truth is that I am not really good at writing them, I also have no idea about what to write!
I kinda tried to write reviews and I did not like doing it that much like even now I have no clue at all what to write I am not really good at blogs I always sucked at it my not good English skills are also not really helping this situation.
I will be not deleting my blog I will be still keeping it but for the last like few months I actually wrote nothing. Some people are born with a skill for writing long posts like this but I am sadly not one of them.
I will be of course keeping my site and still updating it but this will be probably abandoned sadly. People tell me that writing is a skill you aquaire but I don't think so I just plainly speaking suck at it :(
So yeah this is a short post but that's it and that's also one of the reasons I will be quitting writing blog posts I just can't write anything long enough. Maybe once I have some projects I will be writing about them, but for now this is it.
Big thanks to the people reading my blog (If there even are any lol) and hopefully cya when I maybe change my mind about this.
</p>
<br />
<h3><a href="/blog/blog.xhtml">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

View File

@@ -1,47 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content="My review of the Minecraft Movie" />
<meta name="og:description" content="My review of the Minecraft Movie (6/10)" />
<meta name="description" content="My review of the Minecraft Movie (6/10)" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact, blog, nasal snuff, tobacco, Personal Wesbite, niko, joe camel, minecraft movie" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<meta name="date" content="2025-04-07" />
<title>=Purpleblog=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content2" style="text-align: center;">
<h1>=== My Review of the "Minecraft Movie" ===</h1>
<p>
Okay so I went to the cinema to watch the Minecraft movie. Gonna be honest I am terrible at writing reviews but I gonna try my best here.
<br /> <br />
Gonna start off by saying at the end of the day it's a kids comedy. Like if y'all want to watch it don't expect a movie with a good story and mature humor you won't get it from there but even after this I am actually happily surprised. The CGI looked way worse in the trailers, and even I got a smirk on my face from a few of the jokes. The soundtrack was also decent, and somehow the casting was also pretty alright. The story over all was sadly really predictable and the entire plot was also meh. Like I don't know what else to say it was just alright I went and saw it with my younger brother and his friend since I needed to supervise them and they liked it. The children in the cinema also liked it and were laughing at the jokes, if y'all got a young brother and care enough to go to the cinema then yeah I would say it's worth it to see, but if you want to see it by yourself then I don't think it's worth it. So overall I do not regret the money spent the movie was actually fully fine. If they actually invested into the story a bit more I would actually say it's would be pretty amazing I don't know what else to say it was a decent movie, worth it to watch with a younger sibling but not worth it to watch by yourself.
<br /> <br />
Also funny story I overheard some kids talking about how they liked it but they wished it was a animation and not live action. So yeah even the kids believe it shouldn't have been live action LMFAO.
<br />
Solid 6/10 in my opinion could be worse.
</p>
<br />
<h3><a href="/blog/blog.xhtml">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

View File

@@ -1,45 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content="Red Bull snuff review" />
<meta name="og:description" content="Me reviewing the popular snuff called Red Bull" />
<meta name="description" content="Me Reviewing the popular snuff called Red bull" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact, blog, nasal snuff, tobacco, Personal Wesbite, niko, joe camel" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<meta name="date" content="2025-04-08" />
<title>=Purpleblog=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content2" style="text-align: center;">
<h1>=== Snuff review 1. Red bull snuff ===</h1>
<p>
So the Red bull snuff is one of the most popular snuffs here in Poland. It's a also a very popular first snuff for many of people. For me it was the second snuff I ever tried and here is my small review after using it for around 3 weeks:
<br />
Going to start of with saying it's very strong and has a nice minty eucalyptus taste to it. Personally I am really mixed about the taste I don't think it's bad but I do think it's overrated. I saw a lot of people praising it for being the best snuff and the best snuff for beginners which I totally don't agree with. It's in my opinion too strong to beginners and there are better option. Price wise I would say it's in the mid range. I won't be telling the price in my reviews since that changes a lot with the taxes on tobacco changing a lot of the time and they differ a lot by the country. The box it comes in is a average generic Pöschl Tabak box which in my opinion sucks. The boxes tend to open in the pockets sometimes and the clips tend to break off which is really annoying. The aroma at first is amazing but it tends to go away after a while since the box it comes in isn't really "tight" I don't know how to explain it. The snuff last for quite a long while I had my 10g pack for around 3 or maybe even 4 weeks by this point. It also really works well if you have a runny nose since it clears it real good.
<br /> <br />
To summarize: I believe that Red bull is over all good but I also believe that it is way too overrated and very much not a good snuff for beginners. Overall in my opinion it's a big and strong 8/10. Good but not perfect. If you been taking snuff for a while already and never tried it you should try it BUT if you never tried snuff then I would choose a less stronger snuff like maybe OZONA stuff or GLETSCHER PRISE.
</p>
<br />
<h3><a href="/blog/blog.xhtml">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

View File

@@ -1,50 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content="Ozona R-Type snuff review" />
<meta name="og:description" content="My small review of the Ozona R-type snuff" />
<meta name="description" content="My Small review of the Ozona R-type snuff" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact, blog, nasal snuff, tobacco, Personal Wesbite, niko, joe camel" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<meta name="date" content="2025-05-14" />
<title>=Purpleblog=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content2" style="text-align: center;">
<h1>=== Snuff 2 review - Ozona R-type ===</h1>
<p>
So the time finally came. I finished my 5grams of Ozona R-type. This was honestly a really hard snuff to review I have very mixed feelings about this. Well I am going to probably start off by saying it's very weak like probably the weakest one I tried so far. The taste is also pretty chemical but that doesn't mean it's bad it's still pretty good. I also gonna explain what the new "types" mean. Before they were called for example: Ozona Cherry, Raspberry, Orange, etc etc. But now they are called the first letter of the flavor. So Ozona R-type is Ozona Raspberry. It's a stupid and annoying change which I don't really like but you get used to it.
</p>
<img src="/assets/images/blog/2025/ozonar.png" alt="A comparison between the old and new ozona r-type 5 gram packeging" width="300" height="200" />
<p>
Above you can see the differences between the old and new packaging
<br /> <br />
So the flavor is a pretty decent chemical raspberry. It also has some mint in it. Very very good for beginners. I gave it to some of my friends which don't take snuff and they quite liked it (Unlike Red Bull which was somewhat too strong for them.) I personally found it mid since I like stronger snuffs. The packaging is pretty neat so I gonna talk about it. It's a 5gram metal round thingy which you rotate until it opens a hole. It kept the scent for quite a long time, it was also very convenient to use AND easy to open if you want to add a different snuff to it. Honestly I like this type of packaging most. It's nice, small, good, and simply convenient. Honestly I don't know what else to say if you are a beginner searching for some good and weak snuff then you should give Ozona R-Type snuff a shot. But if you are already a snuff user and like stronger snuffs then I would avoid it.
<br /> <br />
And here comes the hard part. Giving it a rating. It's really hard since the taste is good but it's weak which makes it good for beginners but pretty mediocre for people who already are taking snuff and are used to stronger ones. I think it's a strong 6/10 for people who already take snuff and like something stronger and a BIG STRONG 8/10 for new snuff takers.
</p>
<br />
<h3><a href="/blog/blog.xhtml">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

View File

@@ -1,39 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content=" BLOG TITLE " />
<meta name="og:description" content=" BLOG CONTENT " />
<meta name="description" content=" BLOG CONTENT " />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact, blog, nasal snuff, tobacco, Personal Wesbite, niko, joe camel" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=Purpleblog=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content2" style="text-align: center;">
<h1>=== BLOG TITLE ===</h1>
<p>
</p>
<br />
<h3><a href="/blog/blog.xhtml">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

View File

@@ -1,21 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>401</title>
<link rel="icon" href="/favicon.png" />
<link rel="stylesheet" href="/assets/css/style.css" />
</head>
<body>
<div class="error">
_ _ ___ _
| || | / _ \/ |
| || |_| | | | |
|__ _| |_| | |
|_| \___/|_|
401 - Unauthorized
<a href="/index.xhtml">Go home!</a>
</div>
</body>
</html>

View File

@@ -1,21 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>403</title>
<link rel="icon" href="/favicon.png" />
<link rel="stylesheet" href="/assets/css/style.css" />
</head>
<body>
<div class="error">
_ _ ___ _____
| || | / _ \___ /
| || |_| | | ||_ \
|__ _| |_| |__) |
|_| \___/____/
403 - Forbidden
<a href="/index.xhtml">Go home!</a>
</div>
</body>
</html>

View File

@@ -1,21 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>404</title>
<link rel="icon" href="/favicon.png" />
<link rel="stylesheet" href="/assets/css/style.css" />
</head>
<body>
<div class="error">
_ _ ___ _ _
| || | / _ \| || |
| || |_| | | | || |_
|__ _| |_| |__ _|
|_| \___/ |_|
404 - Not Found
<a href="/index.xhtml">Go home!</a>
</div>
</body>
</html>

View File

@@ -1,21 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>500</title>
<link rel="icon" href="/favicon.png" />
<link rel="stylesheet" href="/assets/css/style.css" />
</head>
<body>
<div class="error">
_ _ ___ _____
| || | / _ \___ /
| || |_| | | ||_ \
|__ _| |_| |__) |
|_| \___/____/
500 - Internal Server Error
<a href="/index.xhtml">Go home!</a>
</div>
</body>
</html>

View File

@@ -1,21 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>502</title>
<link rel="icon" href="/favicon.png" />
<link rel="stylesheet" href="/assets/css/style.css" />
</head>
<body>
<div class="error">
____ ___ ____
| ___| / _ \___ \
|___ \| | | |__) |
___) | |_| / __/
|____/ \___/_____|
502 - Bad gateway
<a href="/index.xhtml">Go home!</a>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -1,3 +0,0 @@
uhh hi! as you can see my error thingy is far from being done. This is just a temporay file to let you know if you for whatever reason are here.
have a good day/night

7
example.env Normal file
View File

@@ -0,0 +1,7 @@
export DATABASE='sqlite:///main.db'
export LICENSE='AGPL-3.0-or-later'
export NAME='Your Name'
export EMAIL='test@example.com'
export MEMCACHED='127.0.0.1:11211'
export SOURCE='https://git.ari.lt/templates/flask'
export OG_LOCALE='en_GB'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -1,84 +0,0 @@
import os
import datetime
from bs4 import BeautifulSoup
from feedgen.feed import FeedGenerator
from pytz import UTC # Ensures timezone-aware datetime
# Configuration
BASE_URL = 'https://purplebored.pl'
POSTS_DIR = './blog/posts'
FEED_OUTPUT_DIR = './feeds'
AUTHOR_NAME = 'Purplebored'
AUTHOR_EMAIL = 'purplebored@posteo.com'
def parse_xhtml_post(filepath):
with open(filepath, 'r', encoding='utf-8') as f:
soup = BeautifulSoup(f, 'lxml')
# Try <meta name="og:title" content="...">
og_title = soup.find('meta', attrs={'name': 'og:title'})
if og_title and og_title.get('content'):
title = og_title['content']
else:
# Fallback to <title> tag
title_tag = soup.find('title')
title = title_tag.get_text() if title_tag else 'Untitled'
# Parse <meta name="date" content="YYYY-MM-DD">
date_meta = soup.find('meta', {'name': 'date'})
if date_meta and date_meta.get('content'):
pub_date = datetime.datetime.strptime(date_meta['content'], '%Y-%m-%d')
else:
pub_date = datetime.datetime.fromtimestamp(os.path.getmtime(filepath))
pub_date = pub_date.replace(tzinfo=UTC)
# Extract article or body content
content = soup.find('article') or soup.find('body')
# Generate relative URL
rel_path = os.path.relpath(filepath, POSTS_DIR)
url = f'{BASE_URL}/blog/posts/{rel_path}'.replace('\\', '/')
return {
'title': title,
'url': url,
'date': pub_date,
'content': str(content)
}
def generate_feeds(posts):
fg = FeedGenerator()
fg.id(BASE_URL)
fg.title('Purplebored Blog')
fg.author({'name': AUTHOR_NAME, 'email': AUTHOR_EMAIL})
fg.link(href=BASE_URL, rel='alternate')
fg.language('en')
fg.description('A blog about snuff reviews and other thoughts.')
for post in sorted(posts, key=lambda x: x['date'], reverse=True):
fe = fg.add_entry()
fe.id(post['url'])
fe.title(post['title'])
fe.link(href=post['url'])
fe.published(post['date'])
fe.content(post['content'], type='xhtml')
os.makedirs(FEED_OUTPUT_DIR, exist_ok=True)
fg.rss_file(os.path.join(FEED_OUTPUT_DIR, 'feed.rss'))
fg.atom_file(os.path.join(FEED_OUTPUT_DIR, 'feed.atom'))
def main():
posts = []
for root, dirs, files in os.walk(POSTS_DIR):
for file in files:
if file.endswith('.xhtml'):
filepath = os.path.join(root, file)
post_data = parse_xhtml_post(filepath)
posts.append(post_data)
generate_feeds(posts)
print(f'✅ Generated {len(posts)} posts in RSS and Atom feeds.')
if __name__ == '__main__':
main()

View File

@@ -1,114 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><id>https://purplebored.pl</id><title>Purplebored Blog</title><updated>2025-09-25T19:58:02.453463+00:00</updated><author><name>Purplebored</name><email>purplebored@posteo.com</email></author><link href="https://purplebored.pl" rel="alternate"/><generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator><subtitle>A blog about snuff reviews and other thoughts.</subtitle><entry><id>https://purplebored.pl/blog/posts/2025/my-review-of-the-minecraft-movie.xhtml</id><title>My review of the Minecraft Movie</title><updated>2025-09-25T19:58:02.453546+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><body>
<div class="content2" style="text-align: center;">
<h1>=== My Review of the "Minecraft Movie" ===</h1>
<p>
Okay so I went to the cinema to watch the Minecraft movie. Gonna be honest I am terrible at writing reviews but I gonna try my best here.
<br/> <br/>
Gonna start off by saying at the end of the day it's a kids comedy. Like if y'all want to watch it don't expect a movie with a good story and mature humor you won't get it from there but even after this I am actually happily surprised. The CGI looked way worse in the trailers, and even I got a smirk on my face from a few of the jokes. The soundtrack was also decent, and somehow the casting was also pretty alright. The story over all was sadly really predictable and the entire plot was also meh. Like I don't know what else to say it was just alright I went and saw it with my younger brother and his friend since I needed to supervise them and they liked it. The children in the cinema also liked it and were laughing at the jokes, if y'all got a young brother and care enough to go to the cinema then yeah I would say it's worth it to see, but if you want to see it by yourself then I don't think it's worth it. So overall I do not regret the money spent the movie was actually fully fine. If they actually invested into the story a bit more I would actually say it's would be pretty amazing I don't know what else to say it was a decent movie, worth it to watch with a younger sibling but not worth it to watch by yourself.
<br/> <br/>
Also funny story I overheard some kids talking about how they liked it but they wished it was a animation and not live action. So yeah even the kids believe it shouldn't have been live action LMFAO.
<br/>
Solid 6/10 in my opinion could be worse.
</p>
<br/>
<h3><a href="/blog/blog.xhtml">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored © 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body></div></content><link href="https://purplebored.pl/blog/posts/2025/my-review-of-the-minecraft-movie.xhtml"/><published>2025-04-07T00:00:00+00:00</published></entry><entry><id>https://purplebored.pl/blog/posts/2025/snuff-review-1-red-bull-snuff.xhtml</id><title>Red Bull snuff review</title><updated>2025-09-25T19:58:02.453540+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><body>
<div class="content2" style="text-align: center;">
<h1>=== Snuff review 1. Red bull snuff ===</h1>
<p>
So the Red bull snuff is one of the most popular snuffs here in Poland. It's a also a very popular first snuff for many of people. For me it was the second snuff I ever tried and here is my small review after using it for around 3 weeks:
<br/>
Going to start of with saying it's very strong and has a nice minty eucalyptus taste to it. Personally I am really mixed about the taste I don't think it's bad but I do think it's overrated. I saw a lot of people praising it for being the best snuff and the best snuff for beginners which I totally don't agree with. It's in my opinion too strong to beginners and there are better option. Price wise I would say it's in the mid range. I won't be telling the price in my reviews since that changes a lot with the taxes on tobacco changing a lot of the time and they differ a lot by the country. The box it comes in is a average generic Pöschl Tabak box which in my opinion sucks. The boxes tend to open in the pockets sometimes and the clips tend to break off which is really annoying. The aroma at first is amazing but it tends to go away after a while since the box it comes in isn't really "tight" I don't know how to explain it. The snuff last for quite a long while I had my 10g pack for around 3 or maybe even 4 weeks by this point. It also really works well if you have a runny nose since it clears it real good.
<br/> <br/>
To summarize: I believe that Red bull is over all good but I also believe that it is way too overrated and very much not a good snuff for beginners. Overall in my opinion it's a big and strong 8/10. Good but not perfect. If you been taking snuff for a while already and never tried it you should try it BUT if you never tried snuff then I would choose a less stronger snuff like maybe OZONA stuff or GLETSCHER PRISE.
</p>
<br/>
<h3><a href="/blog/blog.xhtml">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored © 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body></div></content><link href="https://purplebored.pl/blog/posts/2025/snuff-review-1-red-bull-snuff.xhtml"/><published>2025-04-08T00:00:00+00:00</published></entry><entry><id>https://purplebored.pl/blog/posts/2025/snuff-review-2-ozona-r-type-snuff.xhtml</id><title>Ozona R-Type snuff review</title><updated>2025-09-25T19:58:02.453532+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><body>
<div class="content2" style="text-align: center;">
<h1>=== Snuff 2 review - Ozona R-type ===</h1>
<p>
So the time finally came. I finished my 5grams of Ozona R-type. This was honestly a really hard snuff to review I have very mixed feelings about this. Well I am going to probably start off by saying it's very weak like probably the weakest one I tried so far. The taste is also pretty chemical but that doesn't mean it's bad it's still pretty good. I also gonna explain what the new "types" mean. Before they were called for example: Ozona Cherry, Raspberry, Orange, etc etc. But now they are called the first letter of the flavor. So Ozona R-type is Ozona Raspberry. It's a stupid and annoying change which I don't really like but you get used to it.
</p>
<img alt="A comparison between the old and new ozona r-type 5 gram packeging" height="200" src="/assets/images/blog/2025/ozonar.png" width="300"/>
<p>
Above you can see the differences between the old and new packaging
<br/> <br/>
So the flavor is a pretty decent chemical raspberry. It also has some mint in it. Very very good for beginners. I gave it to some of my friends which don't take snuff and they quite liked it (Unlike Red Bull which was somewhat too strong for them.) I personally found it mid since I like stronger snuffs. The packaging is pretty neat so I gonna talk about it. It's a 5gram metal round thingy which you rotate until it opens a hole. It kept the scent for quite a long time, it was also very convenient to use AND easy to open if you want to add a different snuff to it. Honestly I like this type of packaging most. It's nice, small, good, and simply convenient. Honestly I don't know what else to say if you are a beginner searching for some good and weak snuff then you should give Ozona R-Type snuff a shot. But if you are already a snuff user and like stronger snuffs then I would avoid it.
<br/> <br/>
And here comes the hard part. Giving it a rating. It's really hard since the taste is good but it's weak which makes it good for beginners but pretty mediocre for people who already are taking snuff and are used to stronger ones. I think it's a strong 6/10 for people who already take snuff and like something stronger and a BIG STRONG 8/10 for new snuff takers.
</p>
<br/>
<h3><a href="/blog/blog.xhtml">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored © 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body></div></content><link href="https://purplebored.pl/blog/posts/2025/snuff-review-2-ozona-r-type-snuff.xhtml"/><published>2025-05-14T00:00:00+00:00</published></entry><entry><id>https://purplebored.pl/blog/posts/template.xhtml</id><title> BLOG TITLE </title><updated>2025-09-25T19:58:02.453517+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><body>
<div class="content2" style="text-align: center;">
<h1>=== BLOG TITLE ===</h1>
<p>
</p>
<br/>
<h3><a href="/blog/blog.xhtml">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored © 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body></div></content><link href="https://purplebored.pl/blog/posts/template.xhtml"/><published>2025-09-12T23:19:11.980358+00:00</published></entry><entry><id>https://purplebored.pl/blog/posts/2025/blog-future.xhtml</id><title> Future of my blog </title><updated>2025-09-25T19:58:02.453500+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><body>
<div class="content2" style="text-align: center;">
<h1>=== The future of my blog ===</h1>
<p>
Alright I gonna be honest. I don't think I am going to write any blogs anymore. The truth is that I am not really good at writing them, I also have no idea about what to write!
I kinda tried to write reviews and I did not like doing it that much like even now I have no clue at all what to write I am not really good at blogs I always sucked at it my not good English skills are also not really helping this situation.
I will be not deleting my blog I will be still keeping it but for the last like few months I actually wrote nothing. Some people are born with a skill for writing long posts like this but I am sadly not one of them.
I will be of course keeping my site and still updating it but this will be probably abandoned sadly. People tell me that writing is a skill you aquaire but I don't think so I just plainly speaking suck at it :(
So yeah this is a short post but that's it and that's also one of the reasons I will be quitting writing blog posts I just can't write anything long enough. Maybe once I have some projects I will be writing about them, but for now this is it.
Big thanks to the people reading my blog (If there even are any lol) and hopefully cya when I maybe change my mind about this.
</p>
<br/>
<h3><a href="/blog/blog.xhtml">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored © 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body></div></content><link href="https://purplebored.pl/blog/posts/2025/blog-future.xhtml"/><published>2025-09-25T21:57:52.085913+00:00</published></entry></feed>

View File

@@ -1,114 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"><channel><title>Purplebored Blog</title><link>https://purplebored.pl</link><description>A blog about snuff reviews and other thoughts.</description><docs>http://www.rssboard.org/rss-specification</docs><generator>python-feedgen</generator><language>en</language><lastBuildDate>Thu, 25 Sep 2025 19:58:02 +0000</lastBuildDate><item><title>My review of the Minecraft Movie</title><link>https://purplebored.pl/blog/posts/2025/my-review-of-the-minecraft-movie.xhtml</link><description>&lt;body&gt;
&lt;div class="content2" style="text-align: center;"&gt;
&lt;h1&gt;=== My Review of the "Minecraft Movie" ===&lt;/h1&gt;
&lt;p&gt;
Okay so I went to the cinema to watch the Minecraft movie. Gonna be honest I am terrible at writing reviews but I gonna try my best here.
&lt;br/&gt; &lt;br/&gt;
Gonna start off by saying at the end of the day it's a kids comedy. Like if y'all want to watch it don't expect a movie with a good story and mature humor you won't get it from there but even after this I am actually happily surprised. The CGI looked way worse in the trailers, and even I got a smirk on my face from a few of the jokes. The soundtrack was also decent, and somehow the casting was also pretty alright. The story over all was sadly really predictable and the entire plot was also meh. Like I don't know what else to say it was just alright I went and saw it with my younger brother and his friend since I needed to supervise them and they liked it. The children in the cinema also liked it and were laughing at the jokes, if y'all got a young brother and care enough to go to the cinema then yeah I would say it's worth it to see, but if you want to see it by yourself then I don't think it's worth it. So overall I do not regret the money spent the movie was actually fully fine. If they actually invested into the story a bit more I would actually say it's would be pretty amazing I don't know what else to say it was a decent movie, worth it to watch with a younger sibling but not worth it to watch by yourself.
&lt;br/&gt; &lt;br/&gt;
Also funny story I overheard some kids talking about how they liked it but they wished it was a animation and not live action. So yeah even the kids believe it shouldn't have been live action LMFAO.
&lt;br/&gt;
Solid 6/10 in my opinion could be worse.
&lt;/p&gt;
&lt;br/&gt;
&lt;h3&gt;&lt;a href="/blog/blog.xhtml"&gt;Back to the main page&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div class="footer"&gt;
Purplebored © 2023-2025 |
&lt;a href="https://git.ari.lt/purplebored/My-Personal-Website"&gt;Source code&lt;/a&gt; |
&lt;a href="/pages/contact.xhtml"&gt;Contact Me&lt;/a&gt; |
&lt;a href="/pages/mirrors.xhtml"&gt;Tor, Ygg &amp;amp; Mirrors&lt;/a&gt; |
&lt;a href="/pages/font.xhtml"&gt;Font&lt;/a&gt; |
&lt;a href="/pages/feeds.xhtml"&gt;RSS&lt;/a&gt; |
&lt;a href="https://status.purplebored.pl"&gt; Uptime / Status&lt;/a&gt; |
&lt;/div&gt;
&lt;/body&gt;</description><guid isPermaLink="false">https://purplebored.pl/blog/posts/2025/my-review-of-the-minecraft-movie.xhtml</guid><pubDate>Mon, 07 Apr 2025 00:00:00 +0000</pubDate></item><item><title>Red Bull snuff review</title><link>https://purplebored.pl/blog/posts/2025/snuff-review-1-red-bull-snuff.xhtml</link><description>&lt;body&gt;
&lt;div class="content2" style="text-align: center;"&gt;
&lt;h1&gt;=== Snuff review 1. Red bull snuff ===&lt;/h1&gt;
&lt;p&gt;
So the Red bull snuff is one of the most popular snuffs here in Poland. It's a also a very popular first snuff for many of people. For me it was the second snuff I ever tried and here is my small review after using it for around 3 weeks:
&lt;br/&gt;
Going to start of with saying it's very strong and has a nice minty eucalyptus taste to it. Personally I am really mixed about the taste I don't think it's bad but I do think it's overrated. I saw a lot of people praising it for being the best snuff and the best snuff for beginners which I totally don't agree with. It's in my opinion too strong to beginners and there are better option. Price wise I would say it's in the mid range. I won't be telling the price in my reviews since that changes a lot with the taxes on tobacco changing a lot of the time and they differ a lot by the country. The box it comes in is a average generic Pöschl Tabak box which in my opinion sucks. The boxes tend to open in the pockets sometimes and the clips tend to break off which is really annoying. The aroma at first is amazing but it tends to go away after a while since the box it comes in isn't really "tight" I don't know how to explain it. The snuff last for quite a long while I had my 10g pack for around 3 or maybe even 4 weeks by this point. It also really works well if you have a runny nose since it clears it real good.
&lt;br/&gt; &lt;br/&gt;
To summarize: I believe that Red bull is over all good but I also believe that it is way too overrated and very much not a good snuff for beginners. Overall in my opinion it's a big and strong 8/10. Good but not perfect. If you been taking snuff for a while already and never tried it you should try it BUT if you never tried snuff then I would choose a less stronger snuff like maybe OZONA stuff or GLETSCHER PRISE.
&lt;/p&gt;
&lt;br/&gt;
&lt;h3&gt;&lt;a href="/blog/blog.xhtml"&gt;Back to the main page&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div class="footer"&gt;
Purplebored © 2023-2025 |
&lt;a href="https://git.ari.lt/purplebored/My-Personal-Website"&gt;Source code&lt;/a&gt; |
&lt;a href="/pages/contact.xhtml"&gt;Contact Me&lt;/a&gt; |
&lt;a href="/pages/mirrors.xhtml"&gt;Tor, Ygg &amp;amp; Mirrors&lt;/a&gt; |
&lt;a href="/pages/font.xhtml"&gt;Font&lt;/a&gt; |
&lt;a href="/pages/feeds.xhtml"&gt;RSS&lt;/a&gt; |
&lt;a href="https://status.purplebored.pl"&gt; Uptime / Status&lt;/a&gt; |
&lt;/div&gt;
&lt;/body&gt;</description><guid isPermaLink="false">https://purplebored.pl/blog/posts/2025/snuff-review-1-red-bull-snuff.xhtml</guid><pubDate>Tue, 08 Apr 2025 00:00:00 +0000</pubDate></item><item><title>Ozona R-Type snuff review</title><link>https://purplebored.pl/blog/posts/2025/snuff-review-2-ozona-r-type-snuff.xhtml</link><description>&lt;body&gt;
&lt;div class="content2" style="text-align: center;"&gt;
&lt;h1&gt;=== Snuff 2 review - Ozona R-type ===&lt;/h1&gt;
&lt;p&gt;
So the time finally came. I finished my 5grams of Ozona R-type. This was honestly a really hard snuff to review I have very mixed feelings about this. Well I am going to probably start off by saying it's very weak like probably the weakest one I tried so far. The taste is also pretty chemical but that doesn't mean it's bad it's still pretty good. I also gonna explain what the new "types" mean. Before they were called for example: Ozona Cherry, Raspberry, Orange, etc etc. But now they are called the first letter of the flavor. So Ozona R-type is Ozona Raspberry. It's a stupid and annoying change which I don't really like but you get used to it.
&lt;/p&gt;
&lt;img alt="A comparison between the old and new ozona r-type 5 gram packeging" height="200" src="/assets/images/blog/2025/ozonar.png" width="300"/&gt;
&lt;p&gt;
Above you can see the differences between the old and new packaging
&lt;br/&gt; &lt;br/&gt;
So the flavor is a pretty decent chemical raspberry. It also has some mint in it. Very very good for beginners. I gave it to some of my friends which don't take snuff and they quite liked it (Unlike Red Bull which was somewhat too strong for them.) I personally found it mid since I like stronger snuffs. The packaging is pretty neat so I gonna talk about it. It's a 5gram metal round thingy which you rotate until it opens a hole. It kept the scent for quite a long time, it was also very convenient to use AND easy to open if you want to add a different snuff to it. Honestly I like this type of packaging most. It's nice, small, good, and simply convenient. Honestly I don't know what else to say if you are a beginner searching for some good and weak snuff then you should give Ozona R-Type snuff a shot. But if you are already a snuff user and like stronger snuffs then I would avoid it.
&lt;br/&gt; &lt;br/&gt;
And here comes the hard part. Giving it a rating. It's really hard since the taste is good but it's weak which makes it good for beginners but pretty mediocre for people who already are taking snuff and are used to stronger ones. I think it's a strong 6/10 for people who already take snuff and like something stronger and a BIG STRONG 8/10 for new snuff takers.
&lt;/p&gt;
&lt;br/&gt;
&lt;h3&gt;&lt;a href="/blog/blog.xhtml"&gt;Back to the main page&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div class="footer"&gt;
Purplebored © 2023-2025 |
&lt;a href="https://git.ari.lt/purplebored/My-Personal-Website"&gt;Source code&lt;/a&gt; |
&lt;a href="/pages/contact.xhtml"&gt;Contact Me&lt;/a&gt; |
&lt;a href="/pages/mirrors.xhtml"&gt;Tor, Ygg &amp;amp; Mirrors&lt;/a&gt; |
&lt;a href="/pages/font.xhtml"&gt;Font&lt;/a&gt; |
&lt;a href="/pages/feeds.xhtml"&gt;RSS&lt;/a&gt; |
&lt;a href="https://status.purplebored.pl"&gt; Uptime / Status&lt;/a&gt; |
&lt;/div&gt;
&lt;/body&gt;</description><guid isPermaLink="false">https://purplebored.pl/blog/posts/2025/snuff-review-2-ozona-r-type-snuff.xhtml</guid><pubDate>Wed, 14 May 2025 00:00:00 +0000</pubDate></item><item><title> BLOG TITLE </title><link>https://purplebored.pl/blog/posts/template.xhtml</link><description>&lt;body&gt;
&lt;div class="content2" style="text-align: center;"&gt;
&lt;h1&gt;=== BLOG TITLE ===&lt;/h1&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;br/&gt;
&lt;h3&gt;&lt;a href="/blog/blog.xhtml"&gt;Back to the main page&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div class="footer"&gt;
Purplebored © 2023-2025 |
&lt;a href="https://git.ari.lt/purplebored/My-Personal-Website"&gt;Source code&lt;/a&gt; |
&lt;a href="/pages/contact.xhtml"&gt;Contact Me&lt;/a&gt; |
&lt;a href="/pages/mirrors.xhtml"&gt;Tor, Ygg &amp;amp; Mirrors&lt;/a&gt; |
&lt;a href="/pages/font.xhtml"&gt;Font&lt;/a&gt; |
&lt;a href="/pages/feeds.xhtml"&gt;RSS&lt;/a&gt; |
&lt;a href="https://status.purplebored.pl"&gt; Uptime / Status&lt;/a&gt; |
&lt;/div&gt;
&lt;/body&gt;</description><guid isPermaLink="false">https://purplebored.pl/blog/posts/template.xhtml</guid><pubDate>Fri, 12 Sep 2025 23:19:11 +0000</pubDate></item><item><title> Future of my blog </title><link>https://purplebored.pl/blog/posts/2025/blog-future.xhtml</link><description>&lt;body&gt;
&lt;div class="content2" style="text-align: center;"&gt;
&lt;h1&gt;=== The future of my blog ===&lt;/h1&gt;
&lt;p&gt;
Alright I gonna be honest. I don't think I am going to write any blogs anymore. The truth is that I am not really good at writing them, I also have no idea about what to write!
I kinda tried to write reviews and I did not like doing it that much like even now I have no clue at all what to write I am not really good at blogs I always sucked at it my not good English skills are also not really helping this situation.
I will be not deleting my blog I will be still keeping it but for the last like few months I actually wrote nothing. Some people are born with a skill for writing long posts like this but I am sadly not one of them.
I will be of course keeping my site and still updating it but this will be probably abandoned sadly. People tell me that writing is a skill you aquaire but I don't think so I just plainly speaking suck at it :(
So yeah this is a short post but that's it and that's also one of the reasons I will be quitting writing blog posts I just can't write anything long enough. Maybe once I have some projects I will be writing about them, but for now this is it.
Big thanks to the people reading my blog (If there even are any lol) and hopefully cya when I maybe change my mind about this.
&lt;/p&gt;
&lt;br/&gt;
&lt;h3&gt;&lt;a href="/blog/blog.xhtml"&gt;Back to the main page&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div class="footer"&gt;
Purplebored © 2023-2025 |
&lt;a href="https://git.ari.lt/purplebored/My-Personal-Website"&gt;Source code&lt;/a&gt; |
&lt;a href="/pages/contact.xhtml"&gt;Contact Me&lt;/a&gt; |
&lt;a href="/pages/mirrors.xhtml"&gt;Tor, Ygg &amp;amp; Mirrors&lt;/a&gt; |
&lt;a href="/pages/font.xhtml"&gt;Font&lt;/a&gt; |
&lt;a href="/pages/feeds.xhtml"&gt;RSS&lt;/a&gt; |
&lt;a href="https://status.purplebored.pl"&gt; Uptime / Status&lt;/a&gt; |
&lt;/div&gt;
&lt;/body&gt;</description><guid isPermaLink="false">https://purplebored.pl/blog/posts/2025/blog-future.xhtml</guid><pubDate>Thu, 25 Sep 2025 21:57:52 +0000</pubDate></item></channel></rss>

View File

@@ -1,90 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#"
xmlns:fb="https://www.facebook.com/2008/fbml" xml:lang="en"
lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=Windows-1250" />
<!-- Stuff required for embeds and propper SEO -->
<!-- ^ who gives a shit -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="og:url" content="https://purplebored.pl/" />
<meta name="og:title" content="Purplebored.pl" />
<meta name="og:description" content="Just my personal website :-)" />
<meta name="description" content="Just my personal website :-)" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<!-- End -->
<title>=Purplebored=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<!-- Sick ascii art/logo -->
<pre class="ascii-logo">
_____ _ _ _ _
| __ \ | | | | | | | |
| |__) | _ _ __ _ __ | | ___| |__ ___ _ __ ___ __| | _ __ | |
| ___/ | | | '__| '_ \| |/ _ \ '_ \ / _ \| '__/ _ \/ _` | | '_ \| |
| | | |_| | | | |_) | | __/ |_) | (_) | | | __/ (_| |_| |_) | |
|_| \__,_|_| | .__/|_|\___|_.__/ \___/|_| \___|\__,_(_) .__/|_|
| | | |
|_| |_|
</pre>
<!--As my very creative class name may suggest this is the CSS div for my "content". Nothing special.-->
<div class="content1">
<h3>=== About Me ===</h3>
<p>
Hi, I am Purplebored, o/ also known as Niko. Right now you are
on my own little website which I call my home on the World Wide
Web!
</p>
<p>
I like making websites like this. And I am also somewhat of a
privacy advocate. I also love tobaccoo and I really like nasal snuff. I even write a little bit about it but I am still very much a snuff newbie. I speak Polish and English but I am
also learning Russian. Regarding programming I currently only know
basic HTML. From
other stuff I also know some Linux! (Not much but enough to daily
drive it)
</p>
<!-- My projects-->
<h3>=== My Projects ===</h3>
<a href="/pages/projects/irc-discord-bridge.xhtml" target="_blank">
A Discord to IRC bridge (With userbot support.).
</a>
<br />
<a href="/blog/blog.xhtml" target="_blank">
Purpleblog
</a>
<br />
<a href="/pages/guides.xhtml" target="_blank">
A list of guides on how to use XMPP, IRC, PGP, etc.
</a>
<!-- "Cool stuff" Pretty much shit which did not belong to the stuff I am hosting nor my projects-->
<h3>=== Cool Stuff ===</h3>
<a href="/pages/stuff.xhtml">Stuff I like !!</a>
<br />
<a href="/pages/buttons.xhtml">Buttons!/88X31s !!</a>
<br />
<a href="/pages/snuff.xhtml">Nasal snuff !!</a>
<br />
<a href="/pages/music.xhtml">Music I like.</a>
<br />
<a href="/pages/host.xhtml">Things I host.</a>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>
<!-- Code for this website made with passion by Purplebored. https://purplebored.pl/ <3 -->

View File

@@ -1,168 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/buttons.xhtml" />
<meta name="og:title" content="Buttons" />
<meta name="og:description" content="Purplebored 88x31s :-)" />
<meta name="description" content="Purplebored 88x31s :-)" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, 88x31" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=Buttons=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content1" style="text-align: center; margin: 0 auto">
<h3>=== Buttons ===</h3>
Ah yes 88x31 also known as buttons, a staple in personal websites
I would say. They are so cool in my opinion and I love having
them. I even have my own 88x31 which you can download
<a href="/assets/images/buttons/Purplebored_button.png" target="_blank">
Here!
</a>
<br />
(you can also just use that link instead of downloading the
button. That would be even better actually because if I update my
button it's going to automatically update on your website.)
<br />
<h4>Website 88x31s:<br /></h4>
<!-- All the website buttons -->
<!--My personal website button-->
<a href="https://purplebored.pl/" target="_blank">
<img src="/assets/images/buttons/Purplebored_button.png"
alt="My button"/>
</a>
<!--Unpato writing button-->
<a href="https://unpato.neocities.org/" target="_blank">
<img src="/assets/images/buttons/unpato.png"
alt="Unpato writing Button"/>
</a>
<!--tobskep button-->
<a href="https://tobskep.com/" target="_blank">
<img src="/assets/images/buttons/tobskep.gif"
alt="Tobskeep button."/>
</a>
<!--eclipse.cx button-->
<a href="https://eclipse.cx" target="_blank">
<img src="/assets/images/buttons/eclipsecx.png"
alt="Eclipse Comunity Button"/>
</a>
<!--aagaming button-->
<a href="https://aagaming.me/" target="_blank">
<img src="/assets/images/buttons/aagaming.png"
alt="AAgamings button." />
</a>
<!--mcneb10 button-->
<a href="https://themcgovern.net" target="_blank">
<img src="/assets/images/buttons/mcneb10.gif"
alt="Mcneb10 button." />
</a>
<!--georgemoody button-->
<a href="htttps://moody.im/" target="_blank">
<img border="1"
src="/assets/images/buttons/georgemoody.png"
alt="georgemoody button."/>
</a>
<!--Xameren button-->
<a href="https://xameren.fsky.io" target="_blank">
<img src="/assets/images/buttons/xameren.png"
alt="Xamern button." />
</a>
<!--fsky.io button-->
<a href="https://fsky.io" target="_blank">
<img src="/assets/images/buttons/fsky.png"
alt="FSKY.io button."/>
</a>
<!--ari button-->
<a href="https://ari.lt/"
title="ari-web badge"
rel="noopener noreferrer"
target="_blank">
<img src="/assets/images/buttons/ari.png"
alt="ari-web badge" />
</a>
<!--telepath button-->
<a href="https://telepath.im" target="_blank">
<img src="/assets/images/buttons/telepath.png"
alt="Telepath.im button"/>
</a>
<!--Nyx button-->
<a href="https://nyx.everypizza.im" target="_blank">
<img src="/assets/images/buttons/nyx.png"
alt="Nyx everypizza button."/>
</a>
<!-- Aleksey kon button -->
<a href="https://aleksey-kon-games.fsky.io/" target="_blank">
<img src="/assets/images/buttons/aleksey.png"
alt="aleksey kon games button" />
</a>
<!-- k327 button -->
<a href="https://k327.eu/" target="_blank">
<img src="/assets/images/buttons/k327.png"
alt="k327.eu button"/>
</a>
<!-- Trace button -->
<a href="https://vaporwavefox.neocities.org" target="_blank">
<img src="/assets/images/buttons/trace.png"
alt="Trace button"/>
</a>
<!-- Zayd button-->
<a href="https://zayd.fsky.io" target="_blank">
<img src="/assets/images/buttons/zayd.png"
alt="Zayd button" />
</a>
<!-- Authen button-->
<a href="https://authenyo.xyz" target="_blank">
<img src="/assets/images/buttons/authen.gif"
alt="Authen button" />
</a>
<!-- Midgard button (ygg)-->
<a href="http://[300:5506:25eb:d0d9::]">
<img src="/assets/images/buttons/midgard.png"
alt="Midgard button" />
</a>
<!-- End of the website buttons -->
<br />
(btw the midgard buttons links to the ygg site. So you need to have ygg setup to view it.)
<br />
<h4>Other buttons:</h4>
<!--Firefox button-->
<img src="/assets/images/buttons/firefox.gif"
alt="Tested on Firefox button" />
<!--Works on every browser button-->
<img src="/assets/images/buttons/any_browser.gif"
alt="Works on any browser button." />
<!--Made for dark mode button-->
<img src="/assets/images/buttons/dark-mode.gif"
alt="Made for darkmode button." />
<!--Runs on freeBSD button-->
<img src="/assets/images/buttons/freebsd.gif"
alt="Runs on FreeBSD button." />
<br />
<a href="https://airvpn.org/?referred_by=699005"
title="Air VPN - The air to breathe the real Internet"
target="_blank">
<img src="/assets/images/buttons/airvpn_userbar.png"
alt="Air VPN - The air to breathe the real Internet" />
</a>
<br />
<a href="/index.xhtml">Back to the main page</a>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
<!-- Code for this website made with passion by Purplebored. https://purplebored.pl <3 -->
</html>

View File

@@ -1,52 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content="Contact" />
<meta name="og:description" content="Purplebored contacts :-)" />
<meta name="description" content="Purplebored contacts :-)" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=Contact Me=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content1" style="text-align: center; margin: 0 auto">
<h2>=== Contact Me ===</h2>
<h4>Here are some ways to get in touch with me.</h4>
Telegram: @purplebored
Matrix: purplebored:telepath.im<br />
Email: purplebored(at)posteo.com<br />
XMPP: niko(at)telepath.im<br />
<p>
Please avoid using Matrix since I don't really use it anymore and check it only a few times per week. I prefer to be contacted by XMPP or Email.
</p>
<p>
Also if you are contacting me over email or XMPP please use
PGP if you can in both cases!
<a href="/0CB52690CD644413EF66A21CAEF2F9A8C0334670.asc"
target="_blank">
You can get my public key here!
</a>
</p>
<br />
<h3><a href="/index.xhtml">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

View File

@@ -1,43 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content="RSS and Atom feeds" />
<meta name="og:description" content="RSS and Atom feeds." />
<meta name="description" content="RSS and Atom feeds." />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact, feeds" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=Feeds=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content1" style="text-align: center; margin: 0 auto">
<h2>=== My RSS and Atom feed for Purpleblog. ===</h2>
<p>
<a href="/feeds/feed.rss">RSS</a>
<br />
<a href="/feeds/feed.atom">Atom</a>
</p>
<br />
<img src="/assets/images/buttons/valid-atom.png" alt="Valid attom button" />
<img src="/assets/images/buttons/valid-rss.png" alt="Valid RSS button" />
<h3><a href="/">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

View File

@@ -1,40 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content="Contact" />
<meta name="og:description" content="Purplebored contacts :-)" />
<meta name="description" content="Purplebored contacts :-)" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=Font=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content1" style="text-align: center; margin: 0 auto">
<h2>=== The font I am using ===</h2>
<p>
IBM VGA 9x16 font by VileR. (I found it on 4d2.org and really liked it lol)
<a href="https://int10h.org/oldschool-pc-fonts/#-">Link</a>
</p>
<br />
<h3><a href="/">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

View File

@@ -1,56 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content="Contact" />
<meta name="og:description" content="Purplebored contacts :-)" />
<meta name="description" content="Purplebored contacts :-)" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=Purple Guides=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<!-- Sick ascii art/logo -->
<pre class="ascii-logo2" style="text-align: center; margin: 0 auto">
_____ _ _
/ ____| (_) | |
| | __ _ _ _ __| | ___ ___
| | |_ | | | | |/ _` |/ _ \/ __|
| |__| | |_| | | (_| | __/\__ \
\_____|\__,_|_|\__,_|\___||___/
</pre>
<div class="content2" style="text-align: center; margin: 0 auto">
<h3>=== Info ===</h3>
<p>
Below youll find all the guides Ive written. Each guide is
available for download as a PDF or .docx file. Download links
are located at the top of each guide.
</p>
<h3>=== Categories: ===</h3>
<h4><a>XMPP (Coming One day.)</a></h4>
<h4><a>PGP (Coming One day.)</a></h4>
<br />
<h3><a href="/index.xhtml">Back to the home page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>
<!-- Code for this website made with passion by Purplebored. https://purplebored.pl <3 -->

View File

@@ -1,49 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content="Contact" />
<meta name="og:description" content="Purplebored stuff he hosts :-)" />
<meta name="description" content="Purplebored stuff he hosts :-)" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=Things I host:=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content1" style="text-align: center; margin: 0 auto">
<h2>=== Things I host: ===</h2>
<a href="https://bin.purplebored.pl/" target="_blank">
My Private Pastebin instance.
</a>
(Slightly out ofdate)
<br />
Mumble - You can find it on mumble.purplebored.pl (Default port.). Simply connect with your mumble client and talk! You can also connect with ygg.
<br />
Soju (irc Bouncer) soju.purplebored.pl - For now it's for close "homies" only.
<br />
XMPP server. (Running Prosody 13.x.) - For now it's also for close "homies" only.
<a href="https://compliance.conversations.im/server/purplebored.pl/">My servers compliance. (95%)</a>
<br />
Gamja (Web IRC client.) - A web IRC client I host for my soju. <a href="https://soju.purplebored.pl/gamja">Link.</a>
<h3><a href="/">Back to the home page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

View File

@@ -1,69 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content="Contact" />
<meta name="og:description" content="Purplebored contacts :-)" />
<meta name="description" content="Purplebored contacts :-)" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=Mirrors=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content1" style="text-align: center; margin: 0 auto">
<h2>=== Mirrors ===</h2>
<p>
Here is a list of my website mirrors.
</p>
Main URL:
<a href="https://purplebored.pl">https://purplebored.pl (Main site hosted by me)</a>
<br />
Mirror 1 URL:
<a href="https://niko.fsky.io">https://niko.fsky.io (Hosted on fsky.io)</a><br />
Ygg site:
<a href="http://[300:5506:25eb:d0d9:1000:1000:1000:1002]/">http://[300:5506:25eb:d0d9:1000:1000:1000:1002]/ (Hosted on Midgard)</a>
<br />
Ygg site 2:
<a href="http://[200:38ad:e575:f3c1:aba7:9e86:ae1e:4922]/">200:38ad:e575:f3c1:aba7:9e86:ae1e:4922 (Hosted by me.)</a>
Tor:
<a href="http://niko.fsky42e4xj4o4q7xiyxzodqvd75iwgztywxtbugdmixamrmui5l4vhid.onion/">
http://niko.fsky42e4xj4o4q7xiyxzodqvd75iwgztywxtbugdmixamrmui5l4vhid.onion/ (Hosted on fsky.io)
</a>
<br />
Tor 2:
<a href="http://purplebored.midgardmvjfdvespsrfr3fmcyjwmnqhvsmiea7wqoyrrn5rpzp6zo5ad.onion/">
purplebored.midgardmvjfdvespsrfr3fmcyjwmnqhvsmiea7wqoyrrn5rpzp6zo5ad.onion/ (Hosted on Midgard)
</a>
<br />
I2P:
<a href="http://jn5qhsi2ucq4ibpef2blesd3ygkmluafbhavk43omi3bmgity3ba.b32.i2p/">
http://jn5qhsi2ucq4ibpef2blesd3ygkmluafbhavk43omi3bmgity3ba.b32.i2p (Hosted on Midgard)
</a>
<br />
Gopher:
<a href="gopher://worlio.com/1/~purplebored/">
gopher://worlio.com/1/~purplebored/ - My gopher site not really a mirror but I am going to still list it here.
</a>
<br />
<h3><a href="/">Back to the home page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

View File

@@ -1,66 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content="Music" />
<meta name="og:description" content="Purplebored favorite music :-)" />
<meta name="description" content="Purplebored favorite music :-)" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact, music" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=Music=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content1" style="text-align: center; margin: 0 auto">
<h2>=== My Favorite pieces of music. ===</h2>
<p>
Well I probably going to start off by listing my favorite tracks of all time. The order is random: (Those are jewtube links btw.)
<br />
<a href="https://www.youtube.com/watch?v=XeleGQFfbrs">My Yard - The Regular Bus / Мой Двор - Обычный Автобус, и все как обычно</a>
<br />
<a href="https://www.youtube.com/watch?v=6WyY1OAwjpY">Jacek Kaczmarski - "Szklana góra"</a>
<br />
<a href="https://www.youtube.com/watch?v=0dXTeQ8WLUs">HAPPYSAD - Od kiedy ropą</a>
<br />
<a href="https://www.youtube.com/watch?v=6kerTWSFBao">STRACHY NA LACHY - Radio Dalmacija</a>
<br />
<a href="https://www.youtube.com/watch?v=gvDKuRP8vRE">STRACHY NA LACHY - Czarny chleb i czarna kawa</a>
<br />
<a href="https://www.youtube.com/watch?v=8YKAHgwLEMg">Wilki - Urke</a>
<br />
<a href="https://www.youtube.com/watch?v=1YtRuAd7ti4">PIDŻAMA PORNO - Nikt tak pięknie nie mówił, że się boi miłości</a>
<br />
<a href="https://www.youtube.com/watch?v=lHBiAhiddJ8">Włóczęgi - Tylko we Lwowie</a>
<br />
<a href="https://www.youtube.com/watch?v=DIZ8549vE5o">Каскад - Кукушка</a>
<br />
<a href="https://www.youtube.com/watch?v=Ncfm6Fphhlo">Кино - Группа Крови</a>
<br />
<a href="https://youtu.be/SC6pqE7tKuM">Dzień Zwycięstwa - День Победы (Polish and Russian)</a>
<br />
<a href="https://www.youtube.com/watch?v=yL9FnYo7jlc">Edmund Fetting - A jednak mi żal</a>
<br />
<a href="https://www.youtube.com/watch?v=LwaDoEs0st4">JACEK KACZMARSKI - Korespondencja klasowa</a>
<br />
</p>
<br />
<h3><a href="/">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

View File

@@ -1,65 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/projects/irc-discord-bridge.xhtml" />
<meta name="og:title" content="IRC to Discord Bridge" />
<meta name="og:description" content="A project page for the open source IRC to Discord bridge with userbot support." />
<meta name="description" content="A project page for the open source IRC to Discord bridge with userbot support." />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact, discord, irc, bridge, userbot, irc bridge, discord bridge" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=IRC to Discord Bridge:=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content1" style="text-align: center; margin: 0 auto">
<h2>=== IRC to Discord bridge (With userbot support.) ===</h2>
A simple, and modern IRC to Discord userbot bridge written in Node JS used to bridge Disocrd channels and Discord groupchats.
<br />
(Also worth to explain: A userbot (Or selfbot as I sometimes refer to it.) is a bot running on a user account.)
<br />
<a href="https://foundry.fsky.io/purplebored/Discord-userbot-to-irc" target="_blank"> Source code, and instructions how to run it.</a>
<h3>Features:</h3>
<ul>
<li>Multi-Bridge Support - You can bridge multiple channels with multiple IRC rooms all with one config.</li>
<li>Reactions Bridging - Sends a message when a message was reacted to.</li>
<li>Attachments Bridging - Automatically forwards links to images and attachments from Discord messages to IRC.</li>
<li>TLS/Non-TLS IRC Support - Works with both secure (TLS) and standard IRC ports.</li>
<li>Group chat bridges - Since this all works with a selfbot it means that you can bridge a Discord group chat to a IRC room.</li>
<li>YAML Configuration - Simple and a human readable config.</li>
</ul>
<h3>Using a userbot for a bridge why?</h3>
<p>
The why is actually pretty simple I wanted to stop using discord but I still wanted to chat in a discord group chat, but no other bridge supported bridging groupchats so I decided to "vibecode" my own bridge. I also added support for channels since I wanted to host some channels too and that's how this bridge came to life.
<br />
At first it was not even meant to be open source, but after I made it decent enough I decided to open source it since I am guessing other people might need a bridge like this too!
</p>
<h3>Some project info:</h3>
This project is licensed under the <a href="https://foundry.fsky.io/purplebored/Discord-userbot-to-irc/raw/branch/main/LICENSE" target="_blank">Apache 2.0 License.</a>
<br />
This project is written in Node.js
<br />
This project is only pretty much done by me and I am terrible at JS so updates will be quite slow.
<br />
This bridge can use a userbot on the Discord side. Userbots are againsts Discord ToS. No one has been banned yet for using it but it is a posibilty.
<h3><a href="/">Back to the home page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

View File

@@ -1,80 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="og:url" content="https://purplebored.pl/pages/buttons.xhtml" />
<meta name="og:title" content="Nasal Snuff" />
<meta name="og:description" content="Some of my yapps about nasal snuff" />
<meta name="description" content="Some of my yapps about nasal snuff" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, 88x31, tabaka, snuff, nasal snuff, tobbaco, tytoń" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=NASAL SNUFF=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content1" style="text-align: center;">
<h2>=== SNUFF ===</h2>
<div class="snuff-warning">
<h4>
<strong>MINISTER ZDROWIA OSTRZEGA: UŻYWANIE TYTONIU SZKODZI ZDROWIU</strong><br />
<strong>THE MINISTER OF HEALTH WARNS: USING TOBACCO IS HARMFUL TO YOUR HEALTH</strong>
</h4>
<p>
So I am going to start off explaining what nasal snuff even is. Well, snuff is a smokeless tobacco product made from finely ground tobacco leaves. It is snuffed (snorted) into the nasal cavity, delivering nicotine and a nice flavored scent.
Snuff overall is also considered safer than smoking, BUT that does not mean snuff is healthy. Using snuff is still very harmful to your health and it's also 18+ in most countries.
</p>
<h3>List of Snuffs I tried (in order from the ones I tried first to last):</h3>
<ul>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> Gletscher Prise</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> Red Bull</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> Ozona R-type</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> Alpina</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> MED N.99</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> Köningsprise</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> 41 White Elephant</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> GAWITH Original Snuff</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> Ozona President snuff</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> JBR Snuff black</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> Packard's Club snuff</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> Mc Chrystal Aztec</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> Mc Chrystal Sicilian Burst</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> Bernard F Original</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> Bernad's steife prise</li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> Ozona O-type</li>
</ul>
<p> How did I start taking snuff: Well it all started with me being too poor to afford tobacco to roll cigarettes. I saw a nice blue box on the shelf and asked about it. The clerk in the tobacco store explainded that it was snuff and how to take it etc etc. It was also cheap so I decided to give it a shot. Taking snuff for the first time was God damn amazing and after that I started getting more and more brands and watching content related to snuff and learning more about it. Now after taking snuff for a few months I really love it and I am even tempted to fully quit smoking and replace it with snuff. Nasal Snuff is far from a healthy alternative BUT it is better then regular smoking. It's also a lot cheaper. <br />
<br />
I also started to review some of the snuffs I tried so here is a list of the ones already reviewed and the ones I will review in the near future. <br />
Snuff reviews: </p>
<p><ul>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> <a href="/blog/posts/2025/snuff-review-1-red-bull-snuff.xhtml">Red Bull</a></li>
<li><label><input type="checkbox" checked="checked" disabled="disabled" /></label> <a href="/blog/posts/2025/snuff-review-2-ozona-r-type-snuff.xhtml">Ozona R-type</a></li>
</ul>
</p>
</div>
<br /><br />
<a href="/index.xhtml">Back to the home page</a>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
<!-- Code for this website made with passion by Purplebored. https://purplebored.pl <3 -->
</html>

View File

@@ -1,45 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="og:url" content="https://purplebored.pl/pages/contact.xhtml" />
<meta name="og:title" content="Cool stuff" />
<meta name="og:description" content="Stuff Purple likes to do !!" />
<meta name="description" content="Stuff Purple likes to do !!" />
<meta name="keywords" content="purplebored, poland, polish, personal website, website, buttons, niko, self-hosted, open source, foss, contact, music" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="black" />
<title>=Stuff I like=</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<div class="content1" style="text-align: center; margin: 0 auto">
<h2>=== Stuff and things I like to do. ===</h2>
<p>
Well I probably going to start off by saying I really like tobacco products and especially snuff. I like snuff enough that I started writing snuff reviews lol. I also using old and obscure stuff just for fun when really bored.
<br />
I also quite like learning new languages currently learning Russian since I really like Russian music it's very fire.
<br />
Well I also like fishing I am still not very good at it and started recently but I am slowly learning !!
<br />
I also like mechanical watches and watches in general I currently daily drive a Russian Vostok amphibia and I am very happy with it. But I also own and sometimes wear a Casio F-91W.
</p>
<br />
<h3><a href="/">Back to the main page</a></h3>
</div>
<div class="footer">
Purplebored &copy; 2023-2025 |
<a href="https://git.ari.lt/purplebored/My-Personal-Website">Source code</a> |
<a href="/pages/contact.xhtml">Contact Me</a> |
<a href="/pages/mirrors.xhtml">Tor, Ygg &amp; Mirrors</a> |
<a href="/pages/font.xhtml">Font</a> |
<a href="/pages/feeds.xhtml">RSS</a> |
<a href="https://status.purplebored.pl"> Uptime / Status</a> |
</div>
</body>
</html>

23
pyproject.toml Normal file
View File

@@ -0,0 +1,23 @@
[tool.pyright]
pythonVersion = "3.10"
exclude = [
"venv",
"**/node_modules",
"**/__pycache__",
".git",
"src/migrations"
]
include = ["src", "scripts"]
venv = "venv"
stubPath = "src/stubs"
typeCheckingMode = "strict"
useLibraryCodeForTypes = true
reportMissingTypeStubs = true
[tool.mypy]
exclude = [
"^venv/.*",
"^node_modules/.*",
"^__pycache__/.*",
"src/migrations"
]

341
rename.py Normal file
View File

@@ -0,0 +1,341 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Rename the main Flask module to a non-common name"""
import os
import re
import sys
import typing as t
from warnings import filterwarnings as filter_warnings
COMMON_MODULES: t.Final[t.Set[str]] = {
"abc",
"aifc",
"argparse",
"array",
"ast",
"asynchat",
"asyncio",
"asyncore",
"base64",
"bdb",
"bin",
"binascii",
"bisect",
"builtins",
"bz2",
"calendar",
"cgi",
"cgitb",
"chunk",
"cmath",
"cmd",
"code",
"click",
"codecs",
"collections",
"colorsys",
"compileall",
"concurrent",
"configparser",
"contextlib",
"copy",
"copyreg",
"crypt",
"csv",
"ctypes",
"curses",
"dataclasses",
"datetime",
"dbm",
"decimal",
"difflib",
"dis",
"distutils",
"doctest",
"email",
"encodings",
"enum",
"errno",
"faulthandler",
"fcntl",
"filecmp",
"fileinput",
"fnmatch",
"formatter",
"fractions",
"ftplib",
"functools",
"gc",
"getopt",
"getpass",
"gettext",
"glob",
"gzip",
"hashlib",
"heapq",
"hmac",
"html",
"http",
"idlelib",
"imaplib",
"imghdr",
"imp",
"importlib",
"inspect",
"io",
"ipaddress",
"itertools",
"json",
"keyword",
"lib2to3",
"linecache",
"locale",
"logging",
"lzma",
"mailcap",
"marshal",
"math",
"mimetypes",
"mmap",
"modulefinder",
"multiprocessing",
"netrc",
"nis",
"nntplib",
"numbers",
"operator",
"optparse",
"os",
"parser",
"pathlib",
"pdb",
"pickle",
"pickletools",
"pip",
"pkgutil",
"platform",
"plistlib",
"poplib",
"posix",
"pprint",
"profile",
"pstats",
"pty",
"pwd",
"py_compile",
"pyclbr",
"pydoc",
"queue",
"quopri",
"random",
"re",
"readline",
"reprlib",
"resource",
"rlcompleter",
"runpy",
"sched",
"secrets",
"select",
"selectors",
"shelve",
"shlex",
"shutil",
"signal",
"site",
"smtp",
"socket",
"socketserver",
"sqlite3",
"sre_compile",
"sre_constants",
"sre_parse",
"ssl",
"stat",
"statistics",
"string",
"stringprep",
"struct",
"subprocess",
"sunau",
"symtable",
"sys",
"sysconfig",
"tabnanny",
"tarfile",
"telnetlib",
"tempfile",
"termios",
"test",
"textwrap",
"threading",
"time",
"timeit",
"tkinter",
"token",
"tokenize",
"trace",
"traceback",
"tracemalloc",
"tty",
"turtle",
"turtledemo",
"types",
"typing",
"unicodedata",
"unittest",
"urllib",
"uu",
"uuid",
"venv",
"warnings",
"wave",
"weakref",
"webbrowser",
"winreg",
"winsound",
"wsgiref",
"xdrlib",
"xml",
"xmlrpc",
"zipapp",
"zipfile",
"zipimport",
"zlib",
"werkzeug",
"jinja2",
"sqlalchemy",
"requests",
"pytest",
"celery",
"gunicorn",
"alembic",
"bcrypt",
"pillow",
"marshmallow",
"main",
"app",
"init",
"src",
"env",
"dotenv",
"application",
"web",
"www",
"webapp",
"cryptography",
"pycryptodome",
"hashing",
"aes",
"rsa",
"des",
"ssh",
"itsdangerous",
"werkzeug",
"portalocker",
"all",
"any",
"max",
"min",
"pow",
"bleach",
}
def sanitize_module_name(name: str) -> str:
"""Sanitize module name to be a valid Python module name token"""
name = name.strip()
name = name.lower()
name = re.sub(r"[^a-z0-9_]", "_", name)
name = re.sub(r"_+", "_", name)
name = name.strip("_")
if re.match(r"^[0-9]", name):
name = f"_{name}"
return name
def replace_in_file(filepath: str, old: str, new: str) -> None:
"""Read file, replace all occurrences of old with new, write back"""
with open(filepath, "r", encoding="utf-8") as fr:
content: str = fr.read()
new_content: str = content.replace(old, new)
if new_content != content:
with open(filepath, "w", encoding="utf-8") as fw:
fw.write(new_content)
def main() -> int:
"""entry / main function"""
if len(sys.argv) < 2:
print("Rename this template to your preferred name", file=sys.stderr)
print(f"Usage: {sys.argv[0]} <newname>", file=sys.stderr)
return 1
flask_app_dir: str = os.path.join(".", "src", "flask_app")
if not os.path.isdir(flask_app_dir):
print("The application has already been renamed", file=sys.stderr)
return 1
module: str = sanitize_module_name(sys.argv[1])
if not module:
print("The module name must be non-empty", file=sys.stderr)
return 1
if module.startswith("flask"):
print(
"Module name cannot start with 'flask' to avoid conflicts", file=sys.stderr
)
return 1
if module.startswith("_"):
print("Module name cannot start with '_' to avoid conflicts", file=sys.stderr)
return 1
if module in COMMON_MODULES:
print(
f"'{module}' is a reserved module name, please choose another",
file=sys.stderr,
)
return 1
module_dir: str = os.path.join(".", "src", module)
module_file: str = os.path.join(".", "src", f"{module}.py")
if os.path.exists(module_dir) or os.path.exists(module_file):
print(
f"Invalid module name {module} (already exists)", file=sys.stderr
)
return 1
yn: str = input(f"Rename application module to {module}? (y/n) ").strip().lower()
if not yn.startswith("y"):
print("Not renaming the app", file=sys.stderr)
return 1
os.rename(flask_app_dir, module_dir)
for root, _, files in os.walk(os.path.join(".", "src")):
for filename in files:
if filename.endswith(".py"):
filepath: str = os.path.join(root, filename)
replace_in_file(filepath, "flask_app", module)
print(
f"Main module successfully renamed to {module}! You may now remove {sys.argv[0]}"
)
return 0
if __name__ == "__main__":
assert main.__annotations__.get("return") is int, "main() should return an integer"
filter_warnings("error", category=Warning)
raise SystemExit(main())

9
requirements.txt Normal file
View File

@@ -0,0 +1,9 @@
flask
flask-csrf
flask-limiter
flask-migrate
flask-sqlalchemy
flask-wtf
portalocker
python-dotenv
pymemcache

View File

@@ -1,36 +0,0 @@
User-agent: *
Sitemap: https://purplebored.pl/sitemap.xml
# Blocks AI
User-agent: YouBot
User-agent: Omgili
User-agent: PerplexityBot
User-agent: CCBot
User-agent: facebookexternalhit
User-agent: Amazonbot
User-agent: ChatGPT-User
User-agent: ImagesiftBot
User-agent: AI2Bot
User-agent: GPTBot
User-agent: PetalBot
User-agent: Diffbot
User-agent: Bytespider
User-agent: ClaudeBot
User-agent: OAI-SearchBot
User-agent: Applebot-Extended
User-agent: cohere-ai
User-agent: Claude-Web
User-agent: ICC-Crawler
User-agent: VelenPublicWebCrawler
User-agent: Omgilibot
User-agent: anthropic-ai
User-agent: FriendlyCrawler
User-agent: Scrapy
User-agent: img2dataset
User-agent: Google-Extended
User-agent: Timpibot
User-agent: meta-externalagent
User-agent: FacebookBot
User-agent: Ai2Bot-Dolma
Disallow: /

View File

@@ -1,15 +0,0 @@
#!/bin/sh
set -eu
main() {
echo '<?xml version="1.0" encoding="UTF-8"?>'
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'
echo '<url><loc>https://purplebored.pl/</loc><priority>1.0</priority></url>'
find pages/ blog/ -name '*.xhtml' -not -name 'template.xhtml' | while read -r file; do
echo "<url><loc>https://purplebored.pl/${file}</loc><priority>1.0</priority></url>"
done
echo '</urlset>'
}
main >sitemap.xml

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://purplebored.pl/</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/pages/mirrors.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/pages/host.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/pages/guides.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/pages/stuff.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/pages/contact.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/pages/projects/irc-discord-bridge.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/pages/snuff.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/pages/music.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/pages/feeds.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/pages/font.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/pages/buttons.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/blog/posts/2025/snuff-review-2-ozona-r-type-snuff.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/blog/posts/2025/snuff-review-1-red-bull-snuff.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/blog/posts/2025/blog-future.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/blog/posts/2025/my-review-of-the-minecraft-movie.xhtml</loc><priority>1.0</priority></url>
<url><loc>https://purplebored.pl/blog/blog.xhtml</loc><priority>1.0</priority></url>
</urlset>

26
src/app.py Normal file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Flask app example"""
from warnings import filterwarnings as filter_warnings
from flask import Flask
from flask_app import create_app
app: Flask = create_app(__name__)
def main() -> int:
"""entry/main function"""
app.run("127.0.0.1", 8080, True)
return 0
if __name__ == "__main__":
assert main.__annotations__.get("return") is int, "main() should return an integer"
filter_warnings("error", category=Warning)
raise SystemExit(main())

376
src/flask_app/__init__.py Normal file
View File

@@ -0,0 +1,376 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Create flask application"""
import hashlib
import os
import re
import secrets
import sys
import time
import typing as t
from datetime import datetime, timedelta, timezone
from functools import lru_cache
from threading import Thread
import flask
import portalocker # type: ignore
from flask_wtf.csrf import CSRFProtect # type: ignore
from werkzeug.exceptions import HTTPException
from werkzeug.middleware.proxy_fix import ProxyFix
from .const import KEY_FILENAME, KEY_SIZE, POW_DIFFICULTY, SOURCE
from .models import * # To preload all models
__all__: t.Tuple[str] = ("create_app",)
INDENTATION: t.Final[re.Pattern[str]] = re.compile(r"(?m)^[ \t]+|^\s*\n")
CSS_REPLACEMENTS: t.Final[t.Dict[str, str]] = {
": ": ":",
", ": ",",
" > ": ">",
" {": "{",
" / ": "/",
" + ": "+",
}
CSS_REPLACEMENTS_RE: t.Final[re.Pattern[str]] = re.compile(
"|".join(map(re.escape, CSS_REPLACEMENTS.keys()))
)
JS_WS_BLOCK: t.Final[re.Pattern[str]] = re.compile(r"@ws.*?@endws", re.DOTALL)
@lru_cache
def unindent_css(css: str) -> str:
"""Unindent CSS"""
return CSS_REPLACEMENTS_RE.sub(
lambda m: CSS_REPLACEMENTS[m.group(0)],
INDENTATION.sub("", css),
)
@lru_cache
def unindent_js(js: str) -> str:
"""Unindent JavaScript"""
parts: t.List[str] = []
last_end: int = 0
for match in JS_WS_BLOCK.finditer(js):
before: str = js[last_end : match.start()]
before_unindented: str = INDENTATION.sub("", before)
parts.append(before_unindented)
parts.append(match.group(0) + "\n")
last_end = match.end()
after: str = js[last_end:]
after_unindented: str = INDENTATION.sub("", after)
parts.append(after_unindented)
return "".join(parts)
def assign_http(app: flask.Flask) -> flask.Flask:
"""Assign HTTP robots stuff"""
# robots
@app.route("/robots.txt", methods=["GET", "POST"])
def __robots__() -> flask.Response:
"""Robots.txt control file"""
robots: str = (
f"""User-agent: *
Disallow: {flask.url_for("static", filename="css")}
Disallow: {flask.url_for("static", filename="js")}
Sitemap: {app.config['PREFERRED_URL_SCHEME']}://{flask.request.host}/sitemap.xml"""
)
response: flask.Response = flask.Response(robots, mimetype="text/plain")
response.headers["Content-Security-Policy"] = "img-src 'self';"
return response
# sitemap
rule: flask.Rule # type: ignore
sitemap: str = (
'<?xml version="1.0" encoding="UTF-8"?>\
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'
)
def surl(loc: str) -> str:
"""sitemap url"""
u: str = "<url>"
u += f'<loc>{app.config["PREFERRED_URL_SCHEME"]}://%s{loc}</loc>'
u += "<priority>1.0</priority>"
return u + "</url>"
for rule in app.url_map.iter_rules(): # type: ignore
if rule.alias or not rule.methods or "GET" not in rule.methods: # type: ignore
continue
url: str = rule.rule # type: ignore
if ">" not in url:
sitemap += surl(url) # type: ignore
sitemap += "</urlset>"
@app.route("/sitemap.xml", methods=["GET", "POST"])
def __sitemap__() -> flask.Response:
"""Sitemap (website mapping)"""
response: flask.Response = flask.Response(
sitemap.replace("%s", flask.request.host), mimetype="application/xml"
)
response.headers["Content-Security-Policy"] = "img-src 'self';"
return response
return app
def create_app(name: str) -> flask.Flask:
"""Create flask application"""
for var in (
"DATABASE",
"LICENSE",
"NAME",
"EMAIL",
"MEMCACHED",
"SOURCE",
"OG_LOCALE",
):
if var not in os.environ or len(os.environ[var]) == 0:
print(
f"Error: Required environment variable {var} is unset", file=sys.stderr
)
sys.exit(1)
app: flask.Flask = flask.Flask(name)
if not app.debug:
app.wsgi_app = ProxyFix( # type: ignore
app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_prefix=1 # type: ignore
)
app.config["PREFERRED_URL_SCHEME"] = "http" if app.debug else "https"
# Workers support
if os.path.exists(KEY_FILENAME) and (
time.time() > os.path.getmtime(KEY_FILENAME) + 60
):
try:
with open(KEY_FILENAME, "rb") as fp:
portalocker.lock(fp, portalocker.LOCK_EX)
os.remove(KEY_FILENAME)
portalocker.unlock(fp)
except Exception:
pass
if not os.path.exists(KEY_FILENAME):
old_umask: int = os.umask(0o177)
try:
with open(KEY_FILENAME, "bx") as fc:
portalocker.lock(fc, portalocker.LOCK_EX)
fc.write(os.urandom(KEY_SIZE))
fc.flush()
portalocker.unlock(fc)
except FileExistsError:
pass
else:
def _remove_key():
time.sleep(60)
with open(KEY_FILENAME, "rb") as fp:
portalocker.lock(fp, portalocker.LOCK_EX)
if os.path.exists(KEY_FILENAME):
os.remove(KEY_FILENAME)
portalocker.unlock(fp)
Thread(target=_remove_key, daemon=True).start()
finally:
os.umask(old_umask)
with open(KEY_FILENAME, "rb") as kp:
portalocker.lock(kp, portalocker.LOCK_SH)
app.config["SECRET_KEY"] = kp.read(KEY_SIZE)
portalocker.unlock(kp)
# General config
app.config["SESSION_COOKIE_NAME"] = "__Host-session"
app.config["SESSION_COOKIE_SAMESITE"] = "strict"
app.config["SESSION_COOKIE_SECURE"] = True
app.config["SESSION_COOKIE_HTTPONLY"] = True
app.config["SQLALCHEMY_DATABASE_URI"] = os.environ["DATABASE"]
app.config["SQLALCHEMY_ENGINE_OPTIONS"] = {"pool_pre_ping": True}
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
app.config["USE_SESSION_FOR_NEXT"] = True
# Views
from .views import register_blueprints
register_blueprints(app)
# Database
from .db import db, migrate
db.init_app(app)
migrate.init_app(app, db)
# Rate limiting
from .limiter import limiter
limiter.init_app(app)
limiter.enabled = not app.debug
# CSP + CORP + rate limit
@app.before_request
@limiter.limit("")
def _() -> None:
"""Rate limit all requests"""
flask.g.csp_nonce = secrets.token_urlsafe(18)
@app.after_request
def _(response: flask.Response) -> flask.Response:
"""CSP, CORP, cache, security, and privacy"""
is_static: bool = flask.request.path.startswith(
flask.url_for("static", filename="")
)
csp_header: str = (
response.headers.get("Content-Security-Policy", "").strip().rstrip(";")
)
if is_static and "img-src" not in csp_header:
csp_header = f"{csp_header}; img-src 'self'"
if "Cross-Origin-Embedder-Policy" not in response.headers:
response.headers["Cross-Origin-Embedder-Policy"] = "require-corp"
csp_header = f"{csp_header}; default-src 'none'; base-uri 'none'"
if "form-action" not in csp_header:
csp_header = f"{csp_header}; form-action 'none'"
if not app.debug:
csp_header = f"{csp_header}; upgrade-insecure-requests"
response.headers["Content-Security-Policy"] = (
f"{csp_header.strip(';').strip()};"
)
if "Cross-Origin-Resource-Policy" not in response.headers:
response.headers["Cross-Origin-Resource-Policy"] = "same-origin"
if "X-Frame-Options" not in response.headers:
response.headers["X-Frame-Options"] = "DENY"
if "Referrer-Policy" not in response.headers:
response.headers["Referrer-Policy"] = "no-referrer"
response.headers["X-Content-Type-Options"] = "nosniff"
response.headers["X-XSS-Protection"] = "0"
response.headers["Permissions-Policy"] = (
"accelerometer=(), autoplay=(), camera=(), cross-origin-isolated=(), display-capture=(), encrypted-media=(), fullscreen=(), geolocation=(), gyroscope=(), keyboard-map=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(), usb=(), web-share=(), xr-spatial-tracking=(), clipboard-read=(), clipboard-write=(), gamepad=(), hid=(), idle-detection=(), interest-cohort=(), serial=(), unload=()"
)
response.headers["Cross-Origin-Opener-Policy"] = "same-origin"
if is_static:
content_type: str = response.headers.get("Content-Type", "")
if "font/" in content_type:
ext: int = 60 * 60 * 24 * 30 * 6 # 6 months
else:
ext = 60 * 60 * 24 * 7 # 7 days
response.headers["Cache-Control"] = f"public, max-age={ext}"
expire_time: datetime = datetime.now(timezone.utc) + timedelta(seconds=ext)
response.headers["Expires"] = expire_time.strftime(
"%a, %d %b %Y %H:%M:%S GMT"
)
def process_resource_response(processor: t.Callable[[str], str]) -> None:
"""Process resource response"""
response.direct_passthrough = False
content: str = response.get_data(as_text=True)
modified: str = processor(content)
response.set_data(modified)
etag: str = hashlib.sha1(modified.encode("utf-8")).hexdigest()
response.set_etag(etag, weak=False)
response.make_conditional(flask.request)
if "text/css" in content_type:
process_resource_response(unindent_css)
elif "text/javascript" in content_type:
process_resource_response(unindent_js)
return response
# CSRF
CSRFProtect(app)
# Error
@app.errorhandler(HTTPException)
def _(e: HTTPException) -> flask.Response:
"""handle http errors"""
response: flask.Response = flask.make_response(
flask.render_template(
"error.j2",
code=e.code,
summary=e.name,
description=(e.description or f"HTTP error code {e.code}"),
),
)
response.headers["Content-Security-Policy"] = (
f"style-src 'self'; img-src 'self'; script-src 'nonce-{flask.g.csp_nonce}';"
)
response.status_code = e.code or 200
return response
# Template context
license: str = os.environ["LICENSE"]
author_name: str = os.environ["NAME"]
email: str = os.environ["EMAIL"]
og_locale: str = os.environ["OG_LOCALE"]
@app.context_processor # type: ignore
def _() -> t.Any:
"""Context processor"""
now: datetime = datetime.now(timezone.utc)
return {
"current_year": now.year,
"pow_difficulty": POW_DIFFICULTY,
"license": license,
"name": author_name,
"email": email,
"source_code": SOURCE,
"csp_nonce": flask.g.csp_nonce,
"locale": og_locale,
}
# Robots stuff
assign_http(app)
return app

18
src/flask_app/const.py Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Constants"""
import os
from typing import Final
TEXT_SIZE_MAX: Final[int] = 2048
POW_DIFFICULTY: Final[int] = 5
POW_DIFFICULTY_STR: Final[str] = "0" * POW_DIFFICULTY
POW_EXPIRES: Final[int] = 60 * 16 # 16 minutes
POW_NONCE_SIZE: Final[int] = 12
KEY_FILENAME: Final[str] = ".key"
KEY_SIZE: Final[int] = 128
SOURCE: Final[str] = os.environ.get("SOURCE", "http://127.0.0.1/")

16
src/flask_app/db.py Normal file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Flask Database"""
from typing import Tuple
from flask_migrate import Migrate # type: ignore
from flask_sqlalchemy import SQLAlchemy # type: ignore
__all__: Tuple[str, str] = (
"db",
"migrate",
)
db: SQLAlchemy = SQLAlchemy()
migrate: Migrate = Migrate()

View File

@@ -0,0 +1,12 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Forms"""
import typing as t
from . import prow, text
__all__: t.Tuple[str, ...] = (
"text",
"prow",
)

View File

@@ -0,0 +1,64 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Proof-of-Work"""
import hashlib
import secrets
import time
import typing as t
import flask
from flask_app import const
__all__: t.Tuple[str, str] = (
"proof_of_work_protect_session",
"proof_of_work_verify_session",
)
def proof_of_work_protect_session(name: str) -> str:
"""Add a new proof-of-work session, returning a nonce"""
name = name.strip()
if not name:
raise NameError("PoW solution name cannot be empty.")
nonce: str = secrets.token_hex(const.POW_NONCE_SIZE // 2)
flask.session[f"_pow_{name}_nonce"] = nonce
flask.session[f"_pow_{name}_expires"] = time.time() + const.POW_EXPIRES
return nonce
def proof_of_work_verify_session(name: str, solution: str) -> bool:
"""Verify the proof-of-work solution using HMAC"""
if not (solution.isascii() and solution.isdigit()):
return False
nonce_key: str = f"_pow_{name}_nonce"
expires_key: str = f"_pow_{name}_expires"
if nonce_key not in flask.session or expires_key not in flask.session:
return False
nonce: str = flask.session[nonce_key]
expires: float = flask.session[expires_key]
flask.session.pop(nonce_key, None)
flask.session.pop(expires_key, None)
if len(nonce) != const.POW_NONCE_SIZE:
return False
if time.time() > expires:
return False
return (
hashlib.sha256((nonce + solution).encode("ascii"))
.hexdigest()
.startswith(const.POW_DIFFICULTY_STR)
)

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Text form"""
import typing as t
from flask_wtf import FlaskForm # type: ignore
from wtforms import HiddenField, SubmitField, TextAreaField # type: ignore
from wtforms.validators import DataRequired, Length # type: ignore
from flask_app.const import TEXT_SIZE_MAX
__all__: t.Tuple[str, ...] = ("TextForm",)
class TextForm(FlaskForm):
"""Example text form"""
text = TextAreaField(
"Enter some text here",
validators=(
DataRequired(message="You must enter text"),
Length(
min=1,
max=TEXT_SIZE_MAX,
message=f"Invalid length (min=1, max={TEXT_SIZE_MAX}",
),
),
)
pow_solution = HiddenField(
"Proof of Work Solution",
validators=[DataRequired(message="Proof of work is required to submit.")],
)
form_submit = SubmitField("Submit text")

15
src/flask_app/limiter.py Normal file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Rate limiting"""
import os
from flask_limiter import Limiter
from flask_limiter.util import get_remote_address
limiter: Limiter = Limiter(
get_remote_address,
default_limits=["125 per minute", "25 per second"],
storage_uri=f"memcached://{os.environ['MEMCACHED']}",
key_prefix="flask_app_",
)

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Models"""
from typing import Tuple
from .text import TextModel
__all__: Tuple[str, ...] = ("TextModel",)

View File

@@ -0,0 +1,37 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Text model"""
import datetime
import typing as t
from sqlalchemy import DateTime, Unicode
from flask_app.const import TEXT_SIZE_MAX
from flask_app.db import db
__all__: t.Tuple[str] = ("TextModel",)
class TextModel(db.Model):
"""Some text model"""
id = db.Column(
db.Integer,
unique=True,
primary_key=True,
autoincrement=True,
)
text = db.Column(
Unicode(TEXT_SIZE_MAX),
nullable=False,
)
date = db.Column(
DateTime,
default=lambda: datetime.datetime.now(datetime.timezone.utc),
nullable=False,
)
def __init__(self, text: str) -> None:
assert text and len(text) <= TEXT_SIZE_MAX
self.text = text

View File

@@ -0,0 +1,19 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Views"""
from typing import Tuple
from flask import Flask
__all__: Tuple[str] = ("register_blueprints",)
def register_blueprints(app: Flask) -> Flask:
"""Assign all blueprints and their URL prefixes"""
from .home import home
app.register_blueprint(home, url_prefix="/")
return app

261
src/flask_app/views/bp.py Normal file
View File

@@ -0,0 +1,261 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Blueprint"""
import re
from datetime import datetime, timedelta, timezone
from functools import wraps
from typing import Any, Callable, Final, Optional, Tuple, TypeVar, Union
from flask import Blueprint, Response, g, make_response
__all__: Tuple[str] = ("Bp",)
F = TypeVar("F", bound=Callable[..., Any])
DURATION_PATTERN: Final[re.Pattern[str]] = re.compile(
r"(?P<value>\d+)\s*(?P<unit>[dDhHmMsS])"
)
FRAME_ANCESTORS: Final[re.Pattern[str]] = re.compile(r"frame-ancestors\s+([^;]+)")
def parse_duration(duration_str: str) -> int:
"""Parse duration pattern e.g. '1d 2h 30m 15s' and return total seconds."""
duration_str = duration_str.lower().strip()
if duration_str == "0":
return 0
matches: Any = DURATION_PATTERN.findall(duration_str)
total_seconds: int = 0
for value, unit in matches:
value_int: int = int(value)
unit = unit.lower()
if unit == "d":
total_seconds += value_int * 86400
elif unit == "h":
total_seconds += value_int * 3600
elif unit == "m":
total_seconds += value_int * 60
elif unit == "s":
total_seconds += value_int
return total_seconds
class Bp(Blueprint):
"""Blueprint wrapper with utilities"""
def get(self, rule: str, ishtml: bool = False, **kwargs: Any) -> Callable[[F], F]:
"""Wrapper for GET"""
def decorator(f: F) -> F:
self.route(rule, methods=("GET",), **kwargs)(f)
if ishtml:
base_rule: str = rule.rstrip("/")
alias: bool = kwargs.pop("alias", True)
if base_rule:
self.route(
base_rule + "/", methods=("GET",), alias=alias, **kwargs
)(f)
self.route(
base_rule + ".html", methods=("GET",), alias=alias, **kwargs
)(f)
else:
self.route("/index.html", methods=("GET",), alias=alias, **kwargs)(
f
)
return f
return decorator
def post(self, rule: str, **kwargs: Any) -> Callable[[F], F]:
"""Wrapper for POST"""
def decorator(f: F) -> F:
self.route(rule, methods=("POST",), **kwargs)(f)
return f
return decorator
def csp(self, policy: Union[Callable[..., Any], str]) -> Callable[[F], F]:
"""Decorator to set Content-Security-Policy header for this route"""
if callable(policy):
csp_policy: str = getattr(policy, "_csp_policy", "")
else:
csp_policy = policy
for disallowed in ("default-src", "upgrade-insecure-requests", "base-uri"):
if disallowed in csp_policy:
raise ValueError(
f"Disallowed CSP directive {disallowed!r} should not be in custom CSP"
)
def decorator(f: F) -> F:
previous_policy = getattr(f, "_csp_policy", "")
combined_policy = ";".join(
filter(None, [previous_policy.strip(";"), csp_policy.strip(";")])
)
@wraps(f)
def wrapped(*args: Any, **kwargs: Any):
result: Any = f(*args, **kwargs)
response: Response = make_response(result)
existing_csp: str = (
response.headers.get("Content-Security-Policy", "")
.strip()
.rstrip(";")
)
final_policy: str = combined_policy
final_policy = (
final_policy.replace("$nonce", f"'nonce-{g.csp_nonce}'")
.replace("$self", "'self'")
.replace("$none", "'none'")
.replace("$internal", f"'self' 'nonce-{g.csp_nonce}'")
.replace("$wasm", "'wasm-unsafe-eval'")
.strip()
.rstrip(";")
)
full_csp: str = (
";".join(filter(None, [existing_csp, final_policy])) + ";"
)
if "frame-ancestors" in full_csp:
match = FRAME_ANCESTORS.search(full_csp)
if match:
ancestors_value = match.group(1).strip()
if ancestors_value == "'none'":
response.headers["X-Frame-Options"] = "DENY"
elif ancestors_value == "'self'":
response.headers["X-Frame-Options"] = "SAMEORIGIN"
response.headers["Content-Security-Policy"] = full_csp
return response
setattr(wrapped, "_csp_policy", combined_policy)
return wrapped # type: ignore
return decorator
def corp(
self, origin: Union[str, Callable[..., Any]], *methods: str
) -> Callable[[F], F]:
"""Decoreator to set the Cross-Origin-Resource-Policy"""
if callable(origin):
origin_str: str = getattr(origin, "_corp_origin")
methods = getattr(origin, "_corp_methods")
else:
origin_str = origin
if not methods:
raise ValueError("Must specify at least one method.")
def decorator(f: F) -> Any:
@wraps(f)
def wrapped(*args: Any, **kwargs: Any):
result: Any = f(*args, **kwargs)
response: Response = make_response(result)
response.headers["Cross-Origin-Resource-Policy"] = "cross-origin"
response.headers["Access-Control-Allow-Origin"] = origin_str
response.headers["Access-Control-Allow-Methods"] = ", ".join(methods)
return response
setattr(wrapped, "_corp_origin", origin)
setattr(wrapped, "_corp_methods", methods)
return wrapped
return decorator
def cache(
self, duration: Optional[Union[str, Callable[..., Any]]]
) -> Callable[[F], F]:
"""Decoreator to set the Cache Control"""
if callable(duration):
duration_sec: int = getattr(duration, "_duration_sec", 0)
else:
duration_sec = parse_duration(duration) if duration else 0
def decorator(f: F) -> Any:
@wraps(f)
def wrapped(*args: Any, **kwargs: Any):
result: Any = f(*args, **kwargs)
response: Response = make_response(result)
if duration_sec == 0:
response.headers["Cache-Control"] = "no-cache, must-revalidate"
response.headers["Expires"] = "Thu, 1 Jan 1970 00:00:00 GMT"
else:
response.headers["Cache-Control"] = (
f"public, max-age={duration_sec}"
)
expire_time: datetime = datetime.now(timezone.utc) + timedelta(
seconds=duration_sec
)
response.headers["Expires"] = expire_time.strftime(
"%a, %d %b %Y %H:%M:%S GMT"
)
return response
setattr(wrapped, "_duration_sec", duration_sec)
return wrapped
return decorator
def refpol(self, policy: Union[str, Callable[..., Any]]) -> Callable[[F], F]:
"""Decoreator to set the Referrer Policy"""
if callable(policy):
ref_policy: str = getattr(policy, "_ref_policy", "no-referrer")
else:
ref_policy = policy
def decorator(f: F) -> Any:
@wraps(f)
def wrapped(*args: Any, **kwargs: Any):
result: Any = f(*args, **kwargs)
response: Response = make_response(result)
response.headers["Referrer-Policy"] = ref_policy
return response
setattr(wrapped, "_ref_policy", ref_policy)
return wrapped
return decorator
def coep(self, policy: Union[str, Callable[..., Any]]) -> Callable[[F], F]:
"""Decoreator to set the Cross-Origin-Embedder-Policy"""
if callable(policy):
coep_policy: str = getattr(policy, "_coep_policy")
else:
coep_policy = policy
def decorator(f: F) -> Any:
@wraps(f)
def wrapped(*args: Any, **kwargs: Any):
result: Any = f(*args, **kwargs)
response: Response = make_response(result)
response.headers["Cross-Origin-Embedder-Policy"] = coep_policy
return response
setattr(wrapped, "_coep_policy", coep_policy)
return wrapped
return decorator

View File

@@ -0,0 +1,97 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Home routes"""
import typing as t
import flask
from werkzeug.wrappers import Response
import flask_app.forms.prow as form_pow
import flask_app.forms.text as text_form
from flask_app.db import db
from flask_app.models import TextModel
from .bp import Bp
home: Bp = Bp("home", __name__)
__all__: t.Tuple[str] = ("home",)
@home.get("/", ishtml=True)
@home.csp("img-src $self; script-src $internal $wasm; style-src $internal; form-action $self; connect-src $self; manifest-src $self")
def index() -> str:
"""Home page"""
nonce: str = form_pow.proof_of_work_protect_session("home.index/text")
return flask.render_template(
"home/index.j2",
form=text_form.TextForm(),
texts=TextModel.query.all(),
pow_nonce=nonce,
)
@home.post("/")
@home.csp("img-src $self; script-src $internal; style-src $internal")
def text() -> Response:
"""Post some text"""
form: text_form.FlaskForm = text_form.TextForm()
if not form.validate_on_submit(): # type: ignore
flask.flash("Invalid form data/form", "error")
flask.abort(400)
if form.text.data is None:
flask.flash("Invalid form text", "error")
flask.abort(400)
if form.pow_solution.data is None or not form_pow.proof_of_work_verify_session(
"home.index/text",
form.pow_solution.data,
):
flask.flash("Invalid Proof-of-Work solution", "error")
flask.abort(403)
db.session.add(TextModel(text=form.text.data))
db.session.commit()
flask.flash("Your text has been saved")
return flask.redirect(flask.url_for("home.index"))
@home.get("/manifest.json")
@home.csp("manifest-src $self; img-src $self")
@home.cache("30d")
def manifest() -> t.Any:
"""Manifest file"""
return flask.jsonify( # type: ignore
{
"$schema": "https://json.schemastore.org/web-manifest-combined.json",
"short_name": "Example page",
"name": "Example page",
"description": "This is an example description",
"icons": [
{
"src": "/favicon.ico",
"sizes": "256x256",
"type": "image/vnd.microsoft.icon",
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#fbfbfb",
"background_color": "#121212",
}
)
@home.get("/favicon.ico")
@home.csp("img-src $self")
@home.cache("30d")
def favicon() -> Response:
"""Website icon"""
return flask.send_from_directory("static", "favicon.ico")

1
src/migrations/README Normal file
View File

@@ -0,0 +1 @@
Single-database configuration for Flask.

View File

@@ -0,0 +1,50 @@
# A generic, single database configuration.
[alembic]
# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s
# set to 'true' to run the environment during
# the 'revision' command, regardless of autogenerate
# revision_environment = false
# Logging configuration
[loggers]
keys = root,sqlalchemy,alembic,flask_migrate
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
qualname =
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
[logger_alembic]
level = INFO
handlers =
qualname = alembic
[logger_flask_migrate]
level = INFO
handlers =
qualname = flask_migrate
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S

113
src/migrations/env.py Normal file
View File

@@ -0,0 +1,113 @@
import logging
from logging.config import fileConfig
from flask import current_app
from alembic import context
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
# Interpret the config file for Python logging.
# This line sets up loggers basically.
fileConfig(config.config_file_name)
logger = logging.getLogger('alembic.env')
def get_engine():
try:
# this works with Flask-SQLAlchemy<3 and Alchemical
return current_app.extensions['migrate'].db.get_engine()
except (TypeError, AttributeError):
# this works with Flask-SQLAlchemy>=3
return current_app.extensions['migrate'].db.engine
def get_engine_url():
try:
return get_engine().url.render_as_string(hide_password=False).replace(
'%', '%%')
except AttributeError:
return str(get_engine().url).replace('%', '%%')
# add your model's MetaData object here
# for 'autogenerate' support
# from myapp import mymodel
# target_metadata = mymodel.Base.metadata
config.set_main_option('sqlalchemy.url', get_engine_url())
target_db = current_app.extensions['migrate'].db
# other values from the config, defined by the needs of env.py,
# can be acquired:
# my_important_option = config.get_main_option("my_important_option")
# ... etc.
def get_metadata():
if hasattr(target_db, 'metadatas'):
return target_db.metadatas[None]
return target_db.metadata
def run_migrations_offline():
"""Run migrations in 'offline' mode.
This configures the context with just a URL
and not an Engine, though an Engine is acceptable
here as well. By skipping the Engine creation
we don't even need a DBAPI to be available.
Calls to context.execute() here emit the given string to the
script output.
"""
url = config.get_main_option("sqlalchemy.url")
context.configure(
url=url, target_metadata=get_metadata(), literal_binds=True
)
with context.begin_transaction():
context.run_migrations()
def run_migrations_online():
"""Run migrations in 'online' mode.
In this scenario we need to create an Engine
and associate a connection with the context.
"""
# this callback is used to prevent an auto-migration from being generated
# when there are no changes to the schema
# reference: http://alembic.zzzcomputing.com/en/latest/cookbook.html
def process_revision_directives(context, revision, directives):
if getattr(config.cmd_opts, 'autogenerate', False):
script = directives[0]
if script.upgrade_ops.is_empty():
directives[:] = []
logger.info('No changes in schema detected.')
conf_args = current_app.extensions['migrate'].configure_args
if conf_args.get("process_revision_directives") is None:
conf_args["process_revision_directives"] = process_revision_directives
connectable = get_engine()
with connectable.connect() as connection:
context.configure(
connection=connection,
target_metadata=get_metadata(),
**conf_args
)
with context.begin_transaction():
context.run_migrations()
if context.is_offline_mode():
run_migrations_offline()
else:
run_migrations_online()

View File

@@ -0,0 +1,27 @@
"""${message}
Revision ID: ${up_revision}
Revises: ${down_revision | comma,n}
Create Date: ${create_date}
"""
from alembic import op
import sqlalchemy as sa
import flask_app
${imports if imports else ""}
# revision identifiers, used by Alembic.
revision = ${repr(up_revision)}
down_revision = ${repr(down_revision)}
branch_labels = ${repr(branch_labels)}
depends_on = ${repr(depends_on)}
def upgrade():
${upgrades if upgrades else "pass"}
def downgrade():
${downgrades if downgrades else "pass"}

View File

@@ -0,0 +1,37 @@
"""Initial migration
Revision ID: 57fa0d90dc93
Revises:
Create Date: 2025-07-30 20:21:21.163194
"""
from alembic import op
import sqlalchemy as sa
import flask_app
# revision identifiers, used by Alembic.
revision = '57fa0d90dc93'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('text_model',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('text', sa.Unicode(length=2048), nullable=False),
sa.Column('date', sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('text_model')
# ### end Alembic commands ###

68
src/static/css/base.css Normal file
View File

@@ -0,0 +1,68 @@
:root {
color-scheme: dark;
}
*,
*::before,
*::after {
-webkit-box-sizing: border-box;
box-sizing: border-box;
word-wrap: break-word;
scroll-behavior: smooth;
}
code,
code *,
pre,
pre * {
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
}
html {
height: 100%;
min-height: 100%;
}
body {
height: auto;
min-height: 100%;
padding: 2rem;
min-height: 100vh;
}
html,
body {
line-height: 1.5;
}
ol,
ul,
ol *,
ul * {
line-height: 1.8;
}
code {
white-space: pre-wrap !important;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
-webkit-transition: none !important;
-o-transition: none !important;
transition: none !important;
-webkit-animation: none !important;
animation: none !important;
-webkit-animation-play-state: paused !important;
animation-play-state: paused !important;
scroll-behavior: auto !important;
}
}

3
src/static/css/error.css Normal file
View File

@@ -0,0 +1,3 @@
article {
text-align: center;
}

BIN
src/static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

353
src/static/js/pow.js Normal file
View File

@@ -0,0 +1,353 @@
/**
* @licstart The following is the entire license notice for the JavaScript
* code in this file.
*
* Copyright (C) 2025 Arija A. <ari@ari.lt>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* @licend The above is the entire license notice for the JavaScript code
* in this file.
*/
"use strict";
const pow_text_encoder = new TextEncoder();
/**
* Minimal pure JavaScript SHA-256 implementation.
*/
function pow_sha256_js(msg_uint8) {
const K = new Uint32Array([
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1,
0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,
0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,
0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b,
0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a,
0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,
]);
function right_rotate(value, amount) {
return (value >>> amount) | (value << (32 - amount));
}
const msg_length = msg_uint8.length;
const bit_length = msg_length * 8;
/* Padding */
const padded_length =
((msg_length + 9 + 63) >> 6) << 6; /* multiple of 64 */
const padded = new Uint8Array(padded_length);
padded.set(msg_uint8);
padded[msg_length] = 0x80;
const dv = new DataView(padded.buffer);
/* Append 64-bit big-endian length */
dv.setUint32(
padded_length - 8,
Math.floor(bit_length / 0x100000000),
false,
);
dv.setUint32(padded_length - 4, bit_length & 0xffffffff, false);
/* Initial hash values */
let h0 = 0x6a09e667;
let h1 = 0xbb67ae85;
let h2 = 0x3c6ef372;
let h3 = 0xa54ff53a;
let h4 = 0x510e527f;
let h5 = 0x9b05688c;
let h6 = 0x1f83d9ab;
let h7 = 0x5be0cd19;
const w = new Uint32Array(64);
for (let i = 0; i < padded_length; i += 64) {
for (let t = 0; t < 16; ++t) {
w[t] = dv.getUint32(i + t * 4, false);
}
for (let t = 16; t < 64; ++t) {
const s0 =
right_rotate(w[t - 15], 7) ^
right_rotate(w[t - 15], 18) ^
(w[t - 15] >>> 3);
const s1 =
right_rotate(w[t - 2], 17) ^
right_rotate(w[t - 2], 19) ^
(w[t - 2] >>> 10);
w[t] = (w[t - 16] + s0 + w[t - 7] + s1) >>> 0;
}
let a = h0;
let b = h1;
let c = h2;
let d = h3;
let e = h4;
let f = h5;
let g = h6;
let h = h7;
for (let t = 0; t < 64; ++t) {
const S1 =
right_rotate(e, 6) ^ right_rotate(e, 11) ^ right_rotate(e, 25);
const ch = (e & f) ^ (~e & g);
const temp1 = (h + S1 + ch + K[t] + w[t]) >>> 0;
const S0 =
right_rotate(a, 2) ^ right_rotate(a, 13) ^ right_rotate(a, 22);
const maj = (a & b) ^ (a & c) ^ (b & c);
const temp2 = (S0 + maj) >>> 0;
h = g;
g = f;
f = e;
e = (d + temp1) >>> 0;
d = c;
c = b;
b = a;
a = (temp1 + temp2) >>> 0;
}
h0 = (h0 + a) >>> 0;
h1 = (h1 + b) >>> 0;
h2 = (h2 + c) >>> 0;
h3 = (h3 + d) >>> 0;
h4 = (h4 + e) >>> 0;
h5 = (h5 + f) >>> 0;
h6 = (h6 + g) >>> 0;
h7 = (h7 + h) >>> 0;
}
const hash = new Uint8Array(32);
const hash_view = new DataView(hash.buffer);
hash_view.setUint32(0, h0, false);
hash_view.setUint32(4, h1, false);
hash_view.setUint32(8, h2, false);
hash_view.setUint32(12, h3, false);
hash_view.setUint32(16, h4, false);
hash_view.setUint32(20, h5, false);
hash_view.setUint32(24, h6, false);
hash_view.setUint32(28, h7, false);
return hash;
}
/**
* Compute SHA-256 hash of input Uint8Array.
* Uses native crypto.subtle.digest if available, otherwise falls back to pure JS implementation.
*/
async function pow_sha256(message_buffer) {
if (
typeof crypto === "object" &&
crypto.subtle &&
typeof crypto.subtle.digest === "function"
) {
return await crypto.subtle.digest("SHA-256", message_buffer);
} else {
return pow_sha256_js(message_buffer).buffer;
}
}
/**
* Encode a string to Uint8Array using TextEncoder.
*/
function pow_str_to_u8(str) {
return pow_text_encoder.encode(str);
}
/**
* Check if the hash buffer meets the difficulty.
* Difficulty is number of leading zero hex characters (nibbles).
* This function checks bytes directly for better performance.
*/
function pow_meets_difficulty_bytes(hash_buffer, difficulty) {
const hash_bytes = new Uint8Array(hash_buffer);
const zero_bytes = Math.floor(difficulty / 2);
const half_nibble = difficulty % 2;
for (let idx = 0; idx < zero_bytes; ++idx) {
if (hash_bytes[idx] !== 0) return false;
}
if (half_nibble) {
if ((hash_bytes[zero_bytes] & 0xf0) !== 0) return false;
}
return true;
}
/**
* JS Proof-of-Work
*/
async function js_proof_of_work(button, difficulty, nonce) {
let tries = 0;
let solution = 0;
const nonce_str = nonce.toString();
const batch_size = 150000;
while (true) {
for (let idx = 0; idx < batch_size; ++idx) {
const message = nonce_str + solution.toString();
const message_buffer = pow_str_to_u8(message);
const hash_buffer = await pow_sha256(message_buffer);
if (pow_meets_difficulty_bytes(hash_buffer, difficulty)) {
button.value = `Computed PoW after ${tries + idx} tries`;
return solution.toString();
}
++solution;
}
tries += batch_size;
button.value = `Computing PoW (${tries} tries)`;
await new Promise((resolve) => setTimeout(resolve, 0));
}
}
/**
* WASM Proof-of-Work
*/
async function wasm_proof_of_work(button, difficulty, nonce) {
let pow_found = false;
let pow_solution = null;
const wasm_path = "/static/js/wasm/pow.wasm";
const imports = {
global: {
pow_update: (tries) => {
button.value = `Computing PoW (${tries} tries)`;
},
pow_finish: (tries, solution) => {
button.value = `Computed PoW after ${tries} tries`;
pow_solution = solution;
pow_found = true;
},
},
};
let response = await fetch(wasm_path);
if (!response.ok) {
console.warn(`Failed to fetch WASM ${wasm_path}`);
return null;
}
let wasm_module;
if (
"instantiateStreaming" in WebAssembly &&
typeof WebAssembly.instantiateStreaming === "function"
) {
wasm_module = await WebAssembly.instantiateStreaming(response, imports);
} else {
const bytes = await response.arrayBuffer();
wasm_module = await WebAssembly.instantiate(bytes, imports);
}
const { pow_init, pow_solve_batch, memory } = wasm_module.instance.exports;
const encoder = new TextEncoder();
const nonce_bytes = encoder.encode(nonce);
const memory_view = new Uint8Array(memory.buffer);
memory_view.set(nonce_bytes, 0);
pow_init(0, nonce_bytes.length, difficulty);
while (!pow_found) {
const result = pow_solve_batch();
if (result === 1) {
// Solution found, pow_finish callback fired
break;
} else if (result === -1) {
console.error("WASM PoW (initialisation) error.");
return null;
}
// Yield to UI between batches
await new Promise((resolve) => setTimeout(resolve, 0));
}
return pow_solution === null ? null : pow_solution.toString();
}
/**
* Perform proof of work by finding a solution such that
* SHA-256(nonce + solution) hash has leading zeros per difficulty.
*/
async function proof_of_work(button, difficulty, nonce) {
button.value = "Computing PoW (0 tries)";
await new Promise((resolve) => setTimeout(resolve, 0));
if ("WebAssembly" in window && typeof WebAssembly === "object") {
const sol = await wasm_proof_of_work(button, difficulty, nonce);
if (sol !== null) {
return sol;
} else {
console.warn(
"WebAssembly present but failed to compute PoW using web assembly. Falling back to JavaScript.",
);
}
}
return await js_proof_of_work(button, difficulty, nonce);
}
/**
* Wrapper to handle form submission and disable button during PoW.
*/
async function proof_of_work_powform(form, button, difficulty, nonce) {
const was_disabled = button.disabled;
button.disabled = true;
button.setAttribute("aria-label", "Proof of Work is computing...");
try {
form.elements["pow_solution"].value = await proof_of_work(
button,
difficulty,
nonce,
);
} finally {
button.disabled = was_disabled;
button.setAttribute("aria-label", "Submitting...");
}
}
/**
* Wrapper to handle form submission and disable button during PoW on page load.
*/
function proof_of_work_powform_onload(form_id, button_id, difficulty, nonce) {
const form = document.getElementById(form_id);
const form_submit = document.getElementById(button_id);
form.addEventListener("submit", async (evt) => {
evt.preventDefault();
form_submit.disabled = true;
await proof_of_work_powform(form, form_submit, difficulty, nonce);
form_submit.value = "Submitting...";
form.submit();
});
}

Some files were not shown because too many files have changed in this diff Show More