forked from blek/world
1
0
Fork 0

Compare commits

...

19 Commits
main ... main

Author SHA1 Message Date
b1ek a9cd6559bc
add revocation to /key.asc 2024-10-21 19:54:34 +10:00
b1ek ec4c158d2e
Revert "move amber banner to top right"
This reverts commit 11e3f75d99.
2024-10-21 11:57:42 +10:00
b1ek 11e3f75d99
move amber banner to top right 2024-10-20 18:15:24 +10:00
b1ek 7cc38727d5
enable the accidentally disabled loader 2024-10-20 17:40:01 +10:00
b1ek 6b5a9601c4
add: amber banner 2024-10-20 17:38:15 +10:00
b1ek f16f7a78d6
remove banner 2024-09-30 21:18:51 +10:00
b1ek 740dfec1e2
upd: contact alert 2024-09-26 16:54:36 +10:00
b1ek 4fc270c09d
add new key 2024-09-03 12:53:28 +10:00
b1ek 4bf96e0691
add guide on how to download music from youtube 2024-08-22 17:13:59 +10:00
b1ek f34e5cbc21
add airline blankets post 2024-08-17 14:41:44 +10:00
b1ek c5f3be31aa
add unadded image 2024-04-15 13:16:45 +10:00
b1ek cb725da974
add a link to hey 2024-04-13 11:15:46 +10:00
b1ek b9df07d74d
add article about DDG 2024-04-11 23:21:08 +10:00
b1ek 0b1e5c0da2
fix the compile error
this time, i fucking compiled it on my local machine. lets see if it works
2024-03-08 17:08:49 +10:00
b1ek 870f8239cd
fix compile error 2024-03-08 17:07:17 +10:00
b1ek 79e6d8bfd0
add the year 2024-03-08 17:06:08 +10:00
b1ek d3a85b75d7
add 8th march post 2024-03-08 17:04:48 +10:00
b1ek 1c6395bcfd
Revert "adapt the content for display"
This reverts commit 296c86dec0.
2024-03-03 19:48:47 +10:00
b1ek 4e85a9967d
Revert "add readme"
This reverts commit 066142d658.
2024-03-03 19:48:21 +10:00
21 changed files with 360 additions and 56 deletions

View File

@ -1,39 +0,0 @@
<p align='center'>
<img src='banner.webp'>
</p>
<h1 align='center'>
otherworld - a zola theme
</h1>
you can see the demo [here](https://world.blek.codes)
## how to use
### prerequisities
1. a linux system. you can use windows for that, but this guide centers itself on linux based systems.
2. you need to have these programs installed: `git` and `zola`
3. some creativity, html and scss skills
### steps
#### 1. clone the repo
(aka download the theme)
lets assume that your website's directory name in `daftpunk`. it will appear in commands a few times, and you should replace it with your website's name.
```sh
$ git clone git@git.blek.codes:blek/otherworld.git daftpunk
$ cd daftpunk
```
#### 2. open an another terminal
in the same directory, run
```sh
$ zola serve
```
#### 3. edit files in the `content` directory...
...as per [zola docs](https://www.getzola.org/documentation/getting-started/overview)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

View File

@ -12,7 +12,7 @@ build_search_index = false
[markdown]
# Whether to do syntax highlighting
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = false
highlight_code = true
[extra]
# Put all your custom variables here

View File

@ -2,21 +2,58 @@
title = "Welcome"
+++
## Welcome to the otherworld!
It does look good, doesn't it? C'mon, it really is
## Welcome to my world!
Hello there! My name is Alice and i am a fullstack web dev. I like to start a lot of side projects, but finish only a few of them.
## Long text to make it look like this page has content
mroreowrmewormeowrmoewrmoewmroweemrweoermooewower :3
## My contacts
You can send me an email (preferred): [me@blek.codes](mailto:me@blek.codes)
I can also be reached via [telegram](https://t.me/bleki42).
Crazy? I used to be crazy. They locked me in a room.
A rubber room. A rubber room with rats. And rats make
me crazy. Crazy? I used to be crazy. They locked me
in a room. A rubber room. A rubber room with rats. And
rats make me crazy. Crazy? Yes, i am crazy UwU
<div class='js-only'>
My time in my timezone is: <span id='time'></span>
<script>
(async () => {
function update() {
document.getElementById('time').innerText = new Date(
new Date().toLocaleString('en-US', { timeZone: 'Asia/Vladivostok' })
).toLocaleString('en-US', {
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
hourCycle: 'h24'
});
setTimeout(update, 1000);
}
update()
})()
</script>
</div>
I also made a lil badge to show if i am currently online. Cool, huh?
<img src='https://online.blek.codes/gif' height='31px' width='88px' alt='A badge showing if i am online or not. Sorry, the only way to know it is to load the gif. It would be all greeny if i am online' />
<a href='/online-badge'>how does it work?</a>
<div class='js-only'>
## Metrics
This website collects anonymous metrics via [umami](https://umami.is). Anonymous means there is no identity attached to those metrics.
Also you can view it [here](https://umami.blek.codes/share/ucLh7hS5xcXCpklV/world)
</div>
## Projects
{{ amber_banner() }}
You can find the list of my projects [here](/projects).
## Blog
See [here](/blog)
## Webrings!!
I like webrings.
<a href="https://webring.haaien.xyz/#1" target="_blank" rel="noopener"><img src="/hairing.gif" alt="A button saying haaien webring" height='31px' width='88px'/></a>
<a href="https://acingtheinternet.netlify.app" target="_blank" rel="noopener"><img src="/acenow.gif" alt="A button saying asexuals now" height='31px' width='88px'></a>
## Facebook & social media
Reject social media. It's evil
@ -24,7 +61,11 @@ Reject social media. It's evil
---
### World's thoughts
Did you ever wonder what a [caterpillar](/caterpillar) looks like?
### Links
- [git repo of the theme](https://git.blek.codes/blek/otherworld)
- [a funny techy podcast](https://www.youtube.com/@tsarp)

View File

@ -0,0 +1,19 @@
+++
template = 'custom/blog-post.html'
title = 'airline blankets are so ew'
description = 'they have a lot of hairs in them'
date = '2024-08-17'
slug = 'airline-blankets'
year = 2024
month = 8
day = 17
lang = 'en'
[extra]
author = 'b1ek <me@blek.codes>'
+++
i flew just a lil bit in my life, and only on one airline so i probably shouldn't be all pissy at all airlines. but seriously, why can't they just wash them properly? i asked for a blanket at a plane and it had hairs and stuff on it.
like i paid 800$ for a single ticket. is that too much effort to wash them every time they fly? i also heard someone asking for a blanket in the end of the flight and the attendant said they didnt have any left. so, there it is again.

View File

@ -0,0 +1,63 @@
+++
template = 'custom/blog-post.html'
title = 'duckduckgo ai chat thing'
description = 'its kinda cool'
date = '2024-04-11'
slug = 'duckduckgo-ai-chat'
year = 2024
month = 4
day = 11
lang = 'en'
[extra]
author = 'b1ek <me@blek.codes>'
+++
so, a few days ago i've noticed that duckduckgo has this weird new "ai chat" option:
![screenshot of duckduckgo page with a red arrow pointing to the "Chat" button](/blog-image/chat-btn.png)
it allows you to select two models: claude 1.2 and chatgpt 3.5. the last one is widely known, however you can find some info on claude [here](https://www.anthropic.com/news/releasing-claude-instant-1-2)
as i've always wondered just how real their claims are that your identity is never attached to the models, i've decided to research into the API.
## chat APIs
| Disclaimer: The following section is of educational purposes only. Please do not scrape DuckDuckGo's APIs, as it would only hurt the company which honestly cares about your privacy. |
| --- |
obviously the first thing i wanted to do see if there is a public chat API. i wasn't suprised when i couldn't find info on any of the public duckduckgo APIs(probably because there isn't any), other than [this stackoverflow answer](https://stackoverflow.com/questions/29346239/duckduckgo-api-how-to-get-more-results)
however i've investigated a bit and turns out that client API is not that complicated as i thought.
now, first of all you need yo obtain the API token via `GET https://duckduckgo.com/duckchat/v1/status` with a header `x-vqd-accept: 1`. the api token will be in the `x-vqd-4` header. it seems a bit tricky to get the right token without it throwing a `ERR_INVALID_VQD` error later, so its best to copy the request as cURL from your browser.
it is quite weird actually that it seems to be accepting only genuine browser-generated headers. however they contain little to no identifying data.
after you got the api key, send a `POST https://duckduckgo.com/duckchat/v1/chat` with a header `x-vqd-4: the-vqd-header-from-previous-request`.
the payload seems to be of this TS type and encoded via JSON:
```ts
type ChatPayload {
messages: { content: string, role: 'user' }[],
model: 'claude-instant-1.2' | 'gpt-3.5-turbo-0125'
}
```
then the API will return the response word-by-word in a good ol' streamed http response in chunks like this:
```json
\n
data: {"role":"assistant","message":".","created":1712840811713,"id":"compl_8pC9nVX8QJlN92jUtcJR8TgB","action":"success","model":"claude-instant-1.2"}
```
also the `/duckchat/v1/chat` request gives you the new VQD which you gotta use for the future requests.
i guess someone could fashion a cli program to read data from that API and print it out in the console.
upd a few days later: i did. [heres the link](https://git.blek.codes/blek/hey)
## the verdict
i think its safe to say that no identity data is collected via the chat APIs, other than your IP address, which by itself is not usually enough to identify a user, especially if you're sitting on a public network.
also if someone from the team who made the API reads this, please tell me if i missed some points, and what the hell does VQD even mean.

View File

@ -0,0 +1,19 @@
+++
template = 'custom/blog-post.html'
title = 'happy 8th march to yall'
description = 'i am quite sad on this day'
date = '2024-03-08'
slug = 'happy-8th-march-2024'
year = 2024
month = 3
day = 8
lang = 'en'
[extra]
author = 'b1ek <me@blek.codes>'
+++
i don't have any people in my life to celebrate or hang out with. i have someone who i can call, but i dont want to talk to them.
let's just hope that next year will be better.

View File

@ -0,0 +1,67 @@
+++
template = 'custom/blog-post.html'
title = 'how to download music from youtube + thumbnail'
description = 'a short small guide on how to download music from youtube, preserving thumbnail'
date = '2024-08-22'
slug = 'download-music-from-yt'
year = 2024
month = 8
day = 22
lang = 'en'
[extra]
author = 'b1ek <me@blek.codes>'
+++
# let's get to the point.
you need to have `yt-dlp` and `ffmpeg` installed, `magick` and `lame` for setting the mp3 cover.
`yt-dlp` has the `-x` option, which automatically extracts the audio with ffmpeg. to specify the file format, use `--audio-format` (mp3, aac, etc):
```
yt-dlp https://youtu.be/oLnq2SdZvQs -x --audio-format mp3 -o flying_north.mp3
```
as you can see, the thumbnail is not preserved by `yt-dlp`:
<img src='/blog-image/yt-music-no-thumb.png' />
to get the thumbnail, do:
```
curl https://i.ytimg.com/vi_webp/$VIDEO_ID/maxresdefault.webp -o file.webp
```
to convert it to JPEG + crop it to 1:1 aspect ratio:
```
magick convert -crop 1:1 -gravity center file.{webp,jpeg}
```
and the last thing, to embed it inside the `.mp3`:
```
lame --ti file.jpeg flying_north.mp3
mv flying_north.mp3.mp3 flying_north.mp3 # there's a good chance `lame` will export the file to `FILENAME.mp3.mp3`
```
so, basically it could be collapsed down to a bash script:
```bash
#!/usr/bin/env bash
VIDEO_ID=oLnq2SdZvQs
filename=file.mp3
cover=$(mktemp)
yt-dlp https://youtu.be/$VIDEO_ID -x --audio-format mp3 -o $filename
curl https://i.ytimg.com/vi_webp/$VIDEO_ID/maxresdefault.webp -o $cover
lame --ti $cover $filename
```
and, yay! it works
<img src='/blog-image/yt-music-works-in-amberol.png' />

34
content/key.asc Normal file
View File

@ -0,0 +1,34 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: This is a revocation certificate
iQKVBCABCAB/FiEEWfRtuFDKRH82Nx3tFFRiIeNZXQ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2hlY2sgY3VycmVudCBrZXkgaHR0cHM6Ly9i
bGVrLmNvZGVzL2tleS5hc2MpIDxtZUBibGVrLmNvZGVzPoiZBBMWCgBBFiEEpsA4
4D0hLQZXUFOtpiLCLJvGFrIFAmbMjtUCGwMFCQWjmoAFCwkIBwICIgIGFQoJCAsC
BBYCAwECHgcCF4AACgkQpiLCLJvGFrJsHAD+Kwwa376LtclKW1scMWWKs4cIgaJw
1dgD8ON1ir2EmrABAJMcoNEFbNREYQTKNul78MbLJYBhb7Dl82EHQRU7essGuDgE
ZsyO1RIKKwYBBAGXVQEFAQEHQB45pX39kNHHz77oy9NtZWO2mQS60Gf+/pGXEScp
dac4AwEIB4h+BBgWCgAmFiEEpsA44D0hLQZXUFOtpiLCLJvGFrIFAmbMjtUCGwwF
CQWjmoAACgkQpiLCLJvGFrKUhQD/ey5K7HZweNtsC8CPKZc8ejxS8rivgU8eoERn
QW98UNYA/3RHKiXditFsV6s+UZjM3raA7hXHkkJNaubXSfFMcFIN
=VbEi
-----END PGP PUBLIC KEY BLOCK-----

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

60
sass/amber-banner.scss Normal file
View File

@ -0,0 +1,60 @@
.amber-banner {
background: #0005;
border: 1px solid #000;
border-radius: 8px;
height: 5rem;
width: fit-content;
padding: 1rem;
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 2rem;
* {
margin: 0; padding: 0;
}
h1 {
font-size: 1.5rem;
}
ul {
list-style: none;
display: flex;
margin-top: 0.5rem;
gap: 0.5rem;
}
small {
display: block;
color: #555555;
}
.amber-banner-icon {
height: 100%;
padding: 0 1rem;
@keyframes amber-banner-icon-breathe {
0%, 30% {
transform: scale(1);
}
56% {
transform: scale(1.1);
}
70%, to {
transform: scale(1);
}
}
animation: amber-banner-icon-breathe 6s ease infinite;
}
}
.amber-banner-title {
width: fit-content;
border-radius: 8px 8px 0 0;
padding: 0.2em 0.5em;
margin: 0;
margin-left: 1rem;
background: #0003;
border: 1px solid #000;
border-bottom: 0;
}

View File

@ -49,4 +49,10 @@ a, a:visited {
&:hover {
text-decoration: underline !important;
}
}
}
pre code {
padding: 0.5em 1em;
display: block;
}

View File

@ -29,7 +29,6 @@
text-align: center;
width: 80%;
max-width: 1200px;
left: 50%;
transform: translateX(-50%);
@ -71,4 +70,4 @@
animation-delay: 1.5s;
animation-fill-mode: forwards;
}
}
}

1
static/amber.svg Normal file
View File

@ -0,0 +1 @@
<svg viewBox="0 0 957.7 1703" xmlns="http://www.w3.org/2000/svg"><path d="M0 560.3c0-22.4 8-44 22.5-61L428 23.3a66.1 66.1 0 0 1 100.6-.1l406.5 476a93.9 93.9 0 0 1 22.5 61.1v536.2c0 20.9-7 41.2-19.8 57.7l-407.3 523.3a66.2 66.2 0 0 1-104.4 0L19.8 1154.1A94 94 0 0 1 0 1096.5Z" fill="url(#a)"/><path d="M0 560.3c0-22.4 8-44 22.5-61L428 23.3a66.1 66.1 0 0 1 100.6-.1l406.5 476a93.9 93.9 0 0 1 22.5 61.1v536.2c0 20.9-7 41.2-19.8 57.7l-407.3 523.3a66.2 66.2 0 0 1-104.4 0L19.8 1154.1A94 94 0 0 1 0 1096.5Z" fill="url(#b)"/><path d="M456.8 461.1a31.8 31.8 0 0 0 22.1-30.3l.4-264.2a19.3 19.3 0 0 0-34-12.5L124.7 529.7a19.3 19.3 0 0 0 20.4 30.8l311.7-99.4z" fill="url(#c)"/><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="rotate(-90 1023.3 682.2) scale(1705.53474)"><stop offset="0" stop-color="#ffa200"/><stop offset="1" stop-color="#ad004f"/></radialGradient><radialGradient id="b" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(525.52052 0 0 775.7961 478.9 775.8)"><stop offset="0" stop-color="#ffa100" stop-opacity="0"/><stop offset=".5" stop-color="#ffa100" stop-opacity=".2"/><stop offset="1" stop-color="#ffa100" stop-opacity=".8"/></radialGradient><linearGradient id="c" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="scale(-795.7954 795.7954) rotate(-67.3 .5 1.1)"><stop offset="0" stop-color="#ffea00"/><stop offset="1" stop-color="#ff7d00"/></linearGradient></defs></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

View File

@ -10,17 +10,17 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;700&display=swap" rel="stylesheet">
<style>
* { font-family: 'Noto Serif JP' }
html { font-family: 'Noto Serif JP' }
</style>
<title>Otherworld</title>
<title>blek! World</title>
</head>
<body>
<div class='screen bg'></div>
<div class='screen content'>
<h1 style='margin-bottom:0'>
<a href='/' class="title-a">Otherworldly</a>
<a href='/' class="title-a">blek! World</a>
</h1>
<hr style='margin:0 auto'/>

View File

@ -0,0 +1,5 @@
<div class="alert" style="background:#e7f29f30;border:1px solid #d7e28f25;padding:2rem;width:fit-content;margin:0rem auto;text-align: center;border-radius:.25rem;">
<h1 style="margin:0;padding:0">{{ title | safe }}</h1>
<hr style="margin:1rem auto">
<p>{{ body | safe }}</p>
</div>

View File

@ -0,0 +1,29 @@
<link rel="stylesheet" href="/amber-banner.css">
<div class="amber-banner-title">
Open source promotion
</div>
<div class="amber-banner">
<img src="/amber.svg" class="amber-banner-icon">
<div>
<h1>Amber: the TypeScript for bash</h1>
<p>
A type safe, easy to use language compiled to bash
</p>
<ul>
<li>
<a href="https://amber-lang.com">
<img alt="Go to website" title="Go to website" referrerpolicy="no-referrer" src="https://img.shields.io/badge/Go_to_website-orange?style=plastic">
</a>
</li>
<li>
<a href="https://github.com/amber-lang/amber.git">
<img alt="GitHub repository" title="Github repository" referrerpolicy="no-referrer" src="https://img.shields.io/github/stars/amber-lang/amber?style=plastic">
</a>
</li>
<li>
<img alt="GPL 3.0 license" title="GPL 3.0 license" referrerpolicy="no-referrer" src="https://img.shields.io/github/license/amber-lang/amber?style=plastic&color=blue">
</li>
</ul>
</div>
</div>