diff --git a/src/assets/12561.png b/src/assets/12561.png new file mode 100644 index 0000000..c73bc31 Binary files /dev/null and b/src/assets/12561.png differ diff --git a/src/assets/image1.png b/src/assets/image1.png new file mode 100644 index 0000000..bc04b73 Binary files /dev/null and b/src/assets/image1.png differ diff --git a/src/assets/image2.png b/src/assets/image2.png new file mode 100644 index 0000000..7ca74af Binary files /dev/null and b/src/assets/image2.png differ diff --git a/src/assets/mm_food_DOOM.png b/src/assets/mm_food_DOOM.png new file mode 100644 index 0000000..a9102fa Binary files /dev/null and b/src/assets/mm_food_DOOM.png differ diff --git a/src/components/Base.astro b/src/components/Base.astro new file mode 100644 index 0000000..e69de29 diff --git a/src/components/CodeBlock.astro b/src/components/CodeBlock.astro new file mode 100644 index 0000000..97cf54b --- /dev/null +++ b/src/components/CodeBlock.astro @@ -0,0 +1,90 @@ +--- +interface Props { + class?: string; + style?: string; + tabindex?: string; + 'data-language'?: string; + [key: string]: any; +} + +const props = Astro.props; +const uniqueId = `code-${Math.random().toString(36).substr(2, 9)}`; +--- + +
+ +
+
+ + + + \ No newline at end of file diff --git a/src/components/Header.astro b/src/components/Header.astro index fe2906c..703b970 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -5,81 +5,109 @@ import HeaderLink from './HeaderLink.astro';
diff --git a/src/components/HeaderLink.astro b/src/components/HeaderLink.astro index 41da846..3c070f1 100644 --- a/src/components/HeaderLink.astro +++ b/src/components/HeaderLink.astro @@ -16,6 +16,7 @@ const isActive = href === pathname || href === '/' + (subpath?.[0] || ''); a { display: inline-block; text-decoration: none; + font-size: 1.5rem; } a.active { font-weight: bolder; diff --git a/src/components/IssoComment.astro b/src/components/IssoComment.astro new file mode 100644 index 0000000..2ba5047 --- /dev/null +++ b/src/components/IssoComment.astro @@ -0,0 +1,22 @@ +--- +interface Props { + postId: string; +} + +const { postId } = Astro.props; +--- + +
+ +
+ + + + \ No newline at end of file diff --git a/src/consts.ts b/src/consts.ts index 0df8a61..c324820 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -1,5 +1,5 @@ // Place any global data in this file. // You can import this data from anywhere in your site by using the `import` keyword. -export const SITE_TITLE = 'Astro Blog'; -export const SITE_DESCRIPTION = 'Welcome to my website!'; +export const SITE_TITLE = 'My-konos'; +export const SITE_DESCRIPTION = 'WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME WELCOME'; diff --git a/src/content.config.ts b/src/content.config.ts index ce37c7f..03dd26b 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -13,6 +13,7 @@ const blog = defineCollection({ pubDate: z.coerce.date(), updatedDate: z.coerce.date().optional(), heroImage: image().optional(), + archived: z.boolean().default(false) }), }); diff --git a/src/content/blog/2021-01-20-Supervillain.mdx b/src/content/blog/2021-01-20-Supervillain.mdx new file mode 100644 index 0000000..ed8e0cb --- /dev/null +++ b/src/content/blog/2021-01-20-Supervillain.mdx @@ -0,0 +1,52 @@ +--- +title: "Supervillain" +description: "My Favorite Supervillain Music" +pubDate: "2020.01.20" +tags: ["Music"] +archived: true +--- + +--- +title: "Snail Sort" +description: "Snail Sort Algorithm in Rust" +pubDate: "July 13, 2022" +tags: ["Rust", "Algorithms"] +archive: false +--- + + +I got hooked into hip-hop after i watched Straight Outta Compton movie. +because of that movie i started to listen pac biggie snoop dre eminem rakim, slick, yada yada +but i heavily listened to kendrick and j cole at that time, it was mostly songs from To pimp and butterfly and 4 your eyez only,  since it came out in 2015.7:52 +at first i only listened to the sound of the instrument. + +
+ +Daniel Dumile also known as MF DOOM,King Ghidrah, Zev Love, DOOM, Viktor Vaughn is one of the most legendary MC in the world. +i've been DOOM  fan since i was a teenager.Hes one of my favorite MCs who brought me to hip hop music when my friends are listening to pop-punk, rock, pop, EDM and metal. + + +my first DOOM song was Accordion + +

+ +

+ +i discovered this song by accident +i was looking for an new hip hop songs that  i want to listen +i was watching to Rage Against the  Machine - Killing In The Name Live Of on youtube +there was no autoplay back then, i belive it was mid 2015. +so after the song stopped i had to scroll the "other video" section to start another videos. +so, i scrolled the section and it was there "Madvillain Accordion".i was intrigued with the thumbnail of the videos +i was like "What's this dude with a mask on , and it has like 4-5m views...well lets try to listened to it i guess" +after i listened to it, i cant stop it +its so goddamn good +the melody, bass, kick, and it has an accordion sound too +i was like "goddamn ive never heard this kind of music" +my first impression of this song is  mainly because of the sounds of the instrument not the vocals + +after i listened this song 3 times i want to know the lyrics cause i wasnt good at english(well right now my engilsh havent get better either) +so i played the music and then i read the lyrics at same time, and when i read the lyrics at the beginning till the end of the song i was like +"wtf is this rhyme, this wordplay is crazy" diff --git a/src/content/blog/2021-03-04-Rust-DataType.mdx b/src/content/blog/2021-03-04-Rust-DataType.mdx new file mode 100644 index 0000000..f797e71 --- /dev/null +++ b/src/content/blog/2021-03-04-Rust-DataType.mdx @@ -0,0 +1,37 @@ +--- +title: "Rust I" +pubDate: "2020.03.04" +description: "Data Types in Rust" +archived: true +tags: ["Rust", "Algorithms"] +--- + +so i tried to implement insertion sort using rust, why ? im bored but i find something interesting stuff + + ```rs + let mut arr = [5,3,2,4,1,6]; + for n in 1..arr.len() { + let key = arr[n]; + let mut i = n - 1; + while i >= 0 && arr[i] > key { + arr[(i+1)] = arr[i]; + i -= 1; + } + arr[(i+1)] = key; + } + println!('{:?}', arr); + ``` + +it's basic stuff no sugarcoated , buuuut it failed of course it and the compiler said + ``` + warning: comparison is useless due to type limits + --> insertion_sort.rs:26:11 + | +26 | while i >= 0 && arr2[i] > key { + | ^^^^^^ + | + = note: `#[warn(unused_comparisons)]` on by default + ``` + +well my lil snailass brain thought "unused comparison??!! what ? + diff --git a/src/content/blog/2021-09-30-Daily-Website.mdx b/src/content/blog/2021-09-30-Daily-Website.mdx new file mode 100644 index 0000000..7a7e701 --- /dev/null +++ b/src/content/blog/2021-09-30-Daily-Website.mdx @@ -0,0 +1,13 @@ +--- +title: "Web Surfing" +description: "My Daily Website" +pubDate: "2021.09.30" +tags: ["Web", "Productivity"] +archived: true +--- + +![bruh](https://images-ext-2.discordapp.net/external/CERF0sfLsukLc3_2vpmYcd85m9TJFfCWTaU_6qspJE0/http/www.animated-gifs.fr/category_sports/surfing-2/0008.gif) + +I start to log all website that i surfed, might be useful who knows [here](https://pear-vase-c18.notion.site/Daily-Website-25acb3b7241648218c051e4eb503e72a "DEEZ") + +and some intresting sites that i [bookmarked](https://pear-vase-c18.notion.site/Interesting-sites-3c8e0b02644d49569c27d8895987e34b "NUTS") diff --git a/src/content/blog/2022-05-13-Snail_sort.mdx b/src/content/blog/2022-05-13-Snail_sort.mdx new file mode 100644 index 0000000..f09abdf --- /dev/null +++ b/src/content/blog/2022-05-13-Snail_sort.mdx @@ -0,0 +1,118 @@ +--- +title: "Snail Sort" +description: "Snail Sort Algorithm in Rust" +pubDate: "July 13, 2022" +tags: ["Rust", "Algorithms"] +archive: false +--- + +I was looking for some file/s on my computer, but instead i found this: +```rs +//main.rs +fn main () { + let mut res: Vec = Vec::new(); + let mut pos = "right"; + let mut vec_index = 0; + let mut a = vec!( + vec![ 1, 2, 3, 4, 5, 6], + vec![20, 21, 22, 23, 24, 7], + vec![19, 32, 33, 34, 25, 8], + vec![18, 31, 100, 35, 26, 9], + vec![17, 30, 29, 28, 27, 10], + vec![16, 15, 14, 13, 12, 11], + ); + + while a.len() != 0 { + if pos == "right" { + let mut temp_vec = a.clone(); + for j in 0..a[vec_index].len() { + res.push(a[vec_index][j]); + temp_vec[vec_index] + .retain(|&x| x == a[vec_index][j]); + } + temp_vec.retain(|x| x.len() != 0 ); + a = temp_vec; + pos = "down"; + } else if pos == "down" { + let mut temp_vec = a.clone(); + res.push(a[vec_index][a[vec_index].len() - 1]); + temp_vec[vec_index] + .retain(|&x| x != a[vec_index][a[vec_index].len() - 1]); + a = temp_vec; + if vec_index + 1 == a.len() { + pos = "left"; + continue; + } + vec_index += 1; + } else if pos == "left" { + let rev_temp: Vec = a[vec_index] + .to_vec() + .into_iter() + .rev() + .collect(); + for j in 0..rev_temp.len() { + res.push(rev_temp[j]); + } + a.pop(); + pos = "up"; + } else if pos == "up" { + vec_index -= 1; + let mut temp_vec = a.clone(); + if vec_index == 0 { + pos = "right"; + continue; + } else { + res.push(a[vec_index][0]); + temp_vec[vec_index] + .retain(|&x| x != a[vec_index][0]); + a = temp_vec; + continue; + } + } + } + + println!("{:?}", res); +} +``` + +So...I got distracted instead of looking the file/s that I supposed to find, +I try to refactor this code 👍. + +Anyway this algorithm is called snailsort algorithm + +``` +SnailSort is an algorithm that takes an array of equal-length sub-arrays and then merges them into a +single array in a clockwise spiral, starting from the upper-left hand corner[1]. + +ex: +[ + [1,2,3], + [8,9,4], + [7,6,5], +] + +return [1,2,3.4.5.6,7,8,9] +``` + + +
+ +
+ +Yeah it's funny.Idk why i worked on snailsort, but i was having fun. +
+ +anyway here's the refactor [result](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f02de1004ba64cde17255802614fed82).Using Match for the routes and Enum to declare the routes avoiding hard coded way +like ``pos="left"`` to make it looks cleaner, and i change about those clones fest +man, damn look at those clones on my first attempt man we naruto now.Using [VecDeque](https://doc.rust-lang.org/std/collections/struct.VecDeque.html) `VecDeque>` +i can easily pop, append/extend, and other manipulation that i want. + +
+ +aaand i forgor about file/s that i supposed to looking for 💀. + +
+
+ +References: +1. [https://medium.com/@spencerwhitehead7/snail-sort-the-gimmick-sort-goat-310510814eab](https://medium.com/@spencerwhitehead7/snail-sort-the-gimmick-sort-goat-310510814eab) diff --git a/src/content/blog/2023-02-11-Scuffed_server.mdx b/src/content/blog/2023-02-11-Scuffed_server.mdx new file mode 100644 index 0000000..56128b2 --- /dev/null +++ b/src/content/blog/2023-02-11-Scuffed_server.mdx @@ -0,0 +1,170 @@ +--- +title: "Scuffed Home Server I" +description: "Setting up a Home Server" +pubDate: "18 Feb 2023" +archive: false +tags: ["Infrastructure", "Scuffed"] +--- + +so after new year i went back to my home, then i found an old laptop that my old brother used +when he was a college student, so rather being dusted and forgotten like promises, imma make it to be a home server. + +
+![BRRAP BRRRAP GANG GANG](https://files.nochill.in/media/20230219_090008.jpg) +this bad boy have up to 12gb RAM good processor and i only need to replace the hard drive cause i expect the drive already fried +and repaste the machine.It's [Asus X540LJ](https://icecat.biz/p/asus/x540lj-xx044t/notebooks-x540lj-xx044t-30687259.html) + + +
+my plan is to use this machine to host my website and other stuff like books, media storage, ffmpeg , etcetera etcetera + +so i tried to turn it on, as expected the drive is dead, then i bought a new 320gb drive from facebook marketplace, i got it cheap 170.000 IDR, of course it's second hand but hey.Then i change the drive, surprise surprise there are 2 slots of 4gigs RAM, nice....i hope it's still working. + +
+## Setup +i'm install the machine with [Debian](https://www.debian.org/download), well because it's just werkz.Then i straight checked the drive using [smartmontools](https://help.ubuntu.com/community/Smartmontools) just in case +![](https://files.nochill.in/media/smrtctlresult_2023_02_19.png) +Thank god, i thought i got cooked.Looks promising no errors log or whatsoever, if you want to know whats the attributes do and how to read smartmontools result you can check [S.M.A.R.T Wiki](https://en.wikipedia.org/wiki/Self-Monitoring,_Analysis_and_Reporting_Technology). +Oh and also just in case,if you want to change wikipedia layout to old layout i found a [Tweet](https://twitter.com/Nerdwiththehat/status/1615852490355777536) that explain how to do it + +
+Okay seems pretty fine so far, then i called my [ISP](https://myrepublic.co.id/en/) for public ip and the cost for public ip is 25.000 IDR/month and 2 weeks of setup from their server, well i expect it's gonna be like 8-10 days to setup but straight 2 weeks...okay sure i guess. 2 weeks later they emailed me and the setup is done so i checked from the admin dashboard +
+![](https://files.nochill.in/media/Screen.png) + +Seems good. + +then i'm install necessary tools like [OpenSSH](https://ubuntu.com/server/docs/service-openssh), [Docker](https://docs.docker.com/engine/), [Nginx](https://nginx.org/en/download.html), [PM2](https://pm2.io/docs/plus/overview/), [Jenkins](https://www.jenkins.io/), [nvm](https://github.com/nvm-sh/nvm), [gitea](https://gitea.io/) + +
+i'm installed it manually, my plan is to put all the tools in container and each container connect +each other like this [hazardous thing](https://cdn.seedno.de/txt/docker-compose.yml.html). +i'm not gonna put it all on containers, some tools gonna build manually, +i don't want my machine getting [cooked](https://files.nochill.in/media/DockerCompose.mp4) while building it.Well it's gonna take a lot time to make that but hey, if the warehouse somehow got exploded, it's gonna be easy to build it up again + +
+## Migrate the website +It's time to move my [website](https://git.nochill.in/nochill/not-your-blog) from [netlify](https://www.netlify.com/) to here. + +so i set up the nginx conf +``` +server_name nochill.in www.nochill.in; + +location / +{ + proxy_pass http://localhost:3333; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; +} +``` + +simple reverse proxy then enable https with [certbot](https://certbot.eff.org/pages/about) + +```bash +sudo certbot --nginx -d nochill.in -d www.nochill.in +``` + +clone the code, build and run it with pm2 : +```bash +pm2 start ./node_modules/gatsby-cli/cli.js --name gatsby_blog -- serve -p 3333 +pm2 save +``` + +## Integrate with Isso +since i have my own server, well why not adding some stuff just to make this website load longer, +and that's why i added a comment section with isso.[Isso](https://isso-comments.de/) is commenting server similar to [disqus](https://disqus.com/) but it allows anonymous comments and simple to use. +if you want to install isso too, you can follow the official instruction [here](https://isso-comments.de/docs/reference/installation) + +then create the isso configuration.Here's my configuration(just in case you want [copy paste it](https://thejh.net/misc/website-terminal-copy-paste)), for more about the [configuration](https://isso-comments.de/docs/reference/server-config/): +``` +// isso.cfg +[general] +dbpath = /home/lo/App/isso/comments.db +host = https://nochill.in/ + +[moderation] +enabled = true + +[admin] +enabled=true +password = + +[server] +listen = http://localhost:1234 +``` + +also i use [uWSGI](https://uwsgi-docs.readthedocs.io/en/latest/) instead of isso default webserver.Well, because uWSGI more safe and reliable + +setup uWSGI server for isso: +``` +// isso.ini +[uwsgi] +http = :1234 +master = true +; set to `nproc` +processes = 4 +cache2 = name=hash,items=1024,blocksize=32 +module = isso.run +virtualenv = ~/isso +env = ISSO_SETTINGS= ~/isso/isso.cfg +``` +run it: +``` +uwsgi /path/to/uwsgi.ini +``` + + +then i added the isso script to my gatsby component +```javascript +import { Script } from "gatsby"; +// ... + +const Comment = ({post_id}) => { + return ( + <> +