forked from blek/world
1
0
Fork 0

Compare commits

...

12 Commits
main ... main

Author SHA1 Message Date
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
17 changed files with 245 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,57 @@
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
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 +60,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' />

15
content/key.asc Normal file
View File

@ -0,0 +1,15 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEZsyO1RYJKwYBBAHaRw8BAQdAl/Y618e4nbHrKwUAVW/YjXQqaAy9ENKKphnV
w77ePJO0e2JsZWshIChwcmV2LiBrZXkgLSA1OUY0NkRCODUwQ0E0NDdGMzYzNzFE
RUQxNDU0NjIyMUUzNTk1RDBDIDsgY2hlY2sgY3VycmVudCBrZXkgaHR0cHM6Ly9i
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

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;
}
}
}

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'/>