Added and Modified Lots of stuff

This commit is contained in:
devoalda 2023-02-12 09:11:10 +08:00
parent bb450fa6b2
commit e22eae817c
15 changed files with 241 additions and 94 deletions

View File

@ -1,5 +1,6 @@
baseURL = "https://devoalda.gitlab.io/" # baseURL = "https://devoalda.gitlab.io/"
title = "Devoalda" baseURL = "https://devblog.periodicc.com/"
title = "Devblog"
theme = "zzo" theme = "zzo"
defaultContentLanguage = "en" defaultContentLanguage = "en"
@ -12,7 +13,7 @@ enableRobotsTXT = true
summaryLength = 70 summaryLength = 70
buildFuture = true buildFuture = true
copyright = "[Devoalda](https://devoalda.gitlab.io) - All right reserved\nLicensed under" copyright = "[devblog](https://devblog.periodicc.com) - All right reserved\nLicensed under"
timeout = 10000 timeout = 10000
enableEmoji = true enableEmoji = true
paginate = 13 paginate = 13

View File

@ -1,5 +1,5 @@
[en] [en]
title = "Devoalda" title = "Devblog"
languageName = "English" languageName = "English"
weight = 1 weight = 1
languagedir = "ltr" languagedir = "ltr"

View File

@ -28,6 +28,11 @@
url = "gallery" url = "gallery"
weight = 5 weight = 5
[[main]]
parent = "gallery"
name = "Mysterio"
url = "gallery/mysterio"
[[main]] [[main]]
parent = "gallery" parent = "gallery"
name = "Carnage" name = "Carnage"

View File

@ -1,4 +1,4 @@
logoText = "Devoalda" logoText = "Devblog"
logoType = "short" # long, short logoType = "short" # long, short
logo = true logo = true
description = "Don't like it? Do it yourself!" description = "Don't like it? Do it yourself!"
@ -44,13 +44,13 @@ pubPaginate = 20
# whoami # whoami
myname = "Devoalda" myname = "Devoalda"
email = "woonjunwei@protonmail.com" email = "inktablet_enzymatic@aleeas.com"
whoami = "Programmer🤓Hacker🖥Tinkerer🧠" whoami = "Programmer🤓Hacker🖥Tinkerer🧠"
bioImageUrl = "" bioImageUrl = ""
useGravatar = false useGravatar = false
location = "" location = ""
organization = "" organization = ""
link = "https://devoalda.gitlab.io/" link = "https://devblog.periodicc.com"
# sidebar # sidebar
enableBio = true enableBio = true
@ -124,7 +124,7 @@ commento = false
clientSecret = "" # Your client secret clientSecret = "" # Your client secret
[socialOptions] [socialOptions]
email = "mailto:woonjunwei@protonmail.com" email = "mailto:inktablet_enzymatic@aleeas.com"
phone = "" phone = ""
facebook = "" facebook = ""
twitter = "" twitter = ""

View File

@ -6,7 +6,7 @@ header:
paddingY: 0 paddingY: 0
align: center align: center
title: title:
- Devoalda - Devblog
subtitle: subtitle:
- Don't like it? Do it yourself! - Don't like it? Do it yourself!
titleColor: titleColor:

View File

@ -6,61 +6,74 @@ date = "05-07-2020"
+++ +++
# About # About
This website/blog will contain my tutorials on certain programs I use on GNU/Linux. It will also contain documentation on certain scripts I created while using my system. This website/blog will contain my tutorials on certain programs I use on GNU/Linux. It will also contain documentation on certain scripts I created while using my system.
These are mainly references for myself on the programs I've used before. These are mainly references for myself on the programs I've used before.
This site has also transformed into a place with my CTF/Code Challenge Writeups for future references.
## Business Card ## Business Card
``` bash
curl -sL https://devoalda.gitlab.io/business_card ```bash
curl -sL https://devblog.periodicc.com/business_card
``` ```
# System Information # System Information
![Desktop Screenshot](/images/desktop/desktop.png)
![Desktop Screenshot](/gallery/Mysterio/EOS_1.png)
These are my system information on my daily driver. These are my system information on my daily driver.
- Distribution: Arch Linux - Distribution: EndeavourOS
- Window Manager: Xmonad - Window Manager: KDE
- Status Bar: Xmobar
# Programming # Programming
A hobbyist programmer with experience and interests in:
* Python A hobbyist programmer with interests in:
* Bash
* Golang - Python
* Markdown - Markdown
* Java - LaTex
* C# - Java
* ASP.Net - C
- Bash
- ASP.Net
# Linux & System Administration # Linux & System Administration
I have used a few Linux distributions in the past, mainly: I have used a few Linux distributions in the past, mainly:
* Debian Variants
* Debian
* Proxmox
* Ubuntu
* Raspbian
* Linux mint
* Kali Linux
* Parrot Security OS
* Tails OS
* Arch Variants - Debian Variants
* Manjaro
* Arch Linux _i use arch btw_
* RHEL Variants - Debian
* CentOS - Proxmox
- Ubuntu
- Raspbian
- Linux mint
- Kali Linux
- Parrot Security OS
- Tails OS
* BSD Variants - Arch Variants
* FreeNAS
- EndeavourOS
- Arch Linux _i use arch btw_
- Manjaro
- RHEL Variants
- CentOS
- BSD Variants
- FreeNAS
# Script Development # Script Development
I have developed scripts(Python/Bash) for some of these distributions for automation, which I may share some of the scripts and its use cases in this site. In the screen shot above, there are mini scripts used to display items, for example, the status bar has scripts to display time, volume or music. The lyrics viewer is also another script I developed as I couldn't find any programs online that fits my use case. I have developed scripts(Python/Bash) for some of these distributions for automation, which I may share some of the scripts and its use cases in this site. In the screen shot above, there are mini scripts used to display items, for example, the status bar has scripts to display time, volume or music. The lyrics viewer is also another script I developed as I couldn't find any programs online that fits my use case.
### Bash Scripting ### Bash Scripting
Some of the bash scripts I've developed can be found in my dotfiles [here](https://gitlab.com/devoalda/dotdrop-dotfiles/-/tree/master/dotfiles/local/bin). They are some installation scripts, scripts I use daily and scripts I found on the Internet that was useful to my use cases. Some of the bash scripts I've developed can be found in my dotfiles [here](https://gitlab.com/devoalda/dotdrop-dotfiles/-/tree/master/dotfiles/local/bin). They are some installation scripts, scripts I use daily and scripts I found on the Internet that was useful to my use cases.
_Do check it out!_ _Do check it out!_
@ -69,19 +82,19 @@ _Do check it out!_
Over the years I've spent developing scripts and programs, I have used text editors for different Languages. Here are some of the editors I used in the past Over the years I've spent developing scripts and programs, I have used text editors for different Languages. Here are some of the editors I used in the past
* Notepad++ - Notepad++
- Web Development(HTML,CSS,JS) - Web Development(HTML,CSS,JS)
* Eclipse - Eclipse
- Java & Javafx Development - Java & Javafx Development
* IntelliJ IDEA - IntelliJ IDEA
- Java & Javafx Development - Java & Javafx Development
* Visual Studio - Visual Studio
- C#, ASP.Net - C#, ASP.Net
* Pycharm - Pycharm
- Python Scripting - Python Scripting
* Visual Studio Code - Visual Studio Code
- Python & Bash Scripting - Python & Bash Scripting
* Vim/Neovim - Vim/Neovim
- Python & Bash Scripting - Python & Bash Scripting
- Java Terminal Applications - Java Terminal Applications
- Golang Terminal Applications - Golang Terminal Applications
@ -91,22 +104,22 @@ Over the years I've spent developing scripts and programs, I have used text edit
Deploying Virtual Machines are an essential part to computer science, as it allows us to test and deploy applications in a "containerized" environment. Deploying Virtual Machines are an essential part to computer science, as it allows us to test and deploy applications in a "containerized" environment.
Many of the Virtual Machines I've used/deployed are used for penetration testing, Malware Analysis or just for fun! Virtual Machines allow us to use certain programs from another OS without destroying our base OS. Here are some of the virtualization technologies I have used in the past: Many of the Virtual Machines I've used/deployed are used for penetration testing, Malware Analysis or just for fun! Virtual Machines allow us to use certain programs from another OS without destroying our base OS. Here are some of the virtualization technologies I have used in the past:
* Vmware player/workstation - Vmware player/workstation
* EXSI - EXSI
* VirtualBox - VirtualBox
* Proxmox - Proxmox
* FreeNAS(bhyve) - FreeNAS(bhyve)
# Hardware # Hardware
Here are some of the computer hardware which I have played with in the past: Here are some of the computer hardware which I have played with in the past:
* Raspberry Pi 3b+ & 4b - Raspberry Pi 3b+ & 4b
* My current desktop (Dell Optiplex 7010)
__Thanks for checking out my website!__ **Thanks for checking out my website!**
# Credits # Credits
{{< expand "Credits" >}} {{< expand "Credits" >}}
[Curlable Business Card](https://github.com/tallguyjenks/BusinessCard) [Curlable Business Card](https://github.com/tallguyjenks/BusinessCard)
{{< /expand >}} {{< /expand >}}

View File

@ -1,14 +1,14 @@
╭───────────────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────────────────
│ │ │ │
│ Woon Jun Wei / Devoalda │ │ Woon Jun Wei / Devoalda │
│ │ │ │
│ Email: woonjunwei@gmail.com │ │ Email: inktablet_enzymatic@aleeas.com │
│ Web: https://devoalda.gitlab.io │ │ Web: https://devblog.periodicc.com │
│ │ │ │
│ Gitlab: https://gitlab.com/devoalda │ │ Gitlab: https://gitlab.com/devoalda │
│ GitHub: https://github.com/Devoalda │ │ GitHub: https://github.com/Devoalda │
│ │ │ │
│ Card: curl -sL https://devoalda.gitlab.io/business_card │ │ Card: curl -sL https://devblog.periodicc.com/business_card │
│ │ │ │
╰───────────────────────────────────────────────────────────────╯ ╰──────────────────────────────────────────────────────────────────

View File

@ -0,0 +1,30 @@
---
author: "Devoalda"
authorEmoji: 🐺
title: "Mysterio"
date: 2023-02-12T08:10:44+08:00
description: Desktop Screenshots
type: gallery
mode: at-once # at-once or one-by-one
tags:
- linux
- arch
- EndeavourOS
series:
-
categories:
-
image: images/postImages/Computer.png
images: # when mode is one-by-one, images front matter works
- image: mysterio/EOS_1.png
caption: Mystrio Catppuccin Picture 1
- image: mysterio/EOS_1.png
caption: Mystrio Catppuccin Picture 2
- image: mysterio/EOS_1.png
caption: Mystrio Catppuccin Picture 3
---
Pictures of Mysterio and my working environment
This is themed with [Catppuccin](https://github.com/catppuccin/catppuccin)
Running KDE and EndeavourOS

View File

@ -1,9 +1,10 @@
--- ---
layout: post layout: post
title: Leetcode - Convert the temperature (2469) title: Leetcode - Convert the temperature (2469)
date: '2022-11-18 20:51:00 +0800' description: Leetcode Problem 2649 Updated
categories: [Code, C] date: '2023-02-12 08:51:00 +0800'
tags: [c, leetcode] # TAG names should always be lowercase categories: [Code, C, Java]
tags: [c,java, leetcode] # TAG names should always be lowercase
author: devoalda author: devoalda
math: true math: true
libraries: libraries:
@ -48,8 +49,17 @@ Here is what I've done:
5. I then assigned the values of Kelvin and Fahrenheit to the array using the ans pointer. 5. I then assigned the values of Kelvin and Fahrenheit to the array using the ans pointer.
6. Lastly, I returned the ans pointer. 6. Lastly, I returned the ans pointer.
## Java
I wanted to do this the easy way, calculating each of the values and assigning them to a variable, appending them to the array and returning the array at the end.
I soon realised that I was able to combine all these together by calculating the values in the array assignment statement.
I then returned the `ans` array as my return value.
# Code # Code
### C
```c ```c
/** /**
* Note: The returned array must be malloced, assume caller calls free(). * Note: The returned array must be malloced, assume caller calls free().
@ -75,8 +85,24 @@ double* convertTemperature(double celsius, int* returnSize){
The malloc function creates a size of $2\times$ the size of a `double` data type to store both the values of Kelvin and Fahrenheit, this allows for dynamic allocation of memory. The malloc function creates a size of $2\times$ the size of a `double` data type to store both the values of Kelvin and Fahrenheit, this allows for dynamic allocation of memory.
### Java
```java
class Solution {
public double[] convertTemperature(double celsius) {
double[] ans = {celsius + 273.15, celsius * 1.80 + 32.0};
return ans;
}
}
```
# Afterthoughts # Afterthoughts
This program could probably be improved by directly assigning the ans pointer to the values of Kelvin and Fahrenheit during the calculation. This would reduce the number of lines of code and reduce the memory usage as lesser variables are created. This program could probably be improved by directly assigning the ans pointer to the values of Kelvin and Fahrenheit during the calculation. This would reduce the number of lines of code and reduce the memory usage as lesser variables are created.
I need to have a better understanding of `malloc` and its usage. I need to have a better understanding of `malloc` and its usage.
## Java Implementation
I've done this in Java and it looks significantly easier without the manual dynamic allocation of array in `C`.
I was able to do it by directly calculating the values in the array instead of assigning them to another variable first.

View File

@ -0,0 +1,70 @@
---
author: "Devoalda"
authorEmoji: 🐺
title: "Leetcode - Defanging an IP Address (1108)"
date: 2023-02-12T08:00:54+08:00
description: Leetcode Problem 1108
draft: false
hideToc: false
enableToc: true
enableTocContent: true
tocPosition: inner
tocLevels: ["h1", "h2", "h3"]
libraries:
- mathjax
tags:
- Java
- Leetcode
series:
- Leetcode
categories:
-
image:
---
# Introduction
Given a valid (IPv4) IP address, return a defanged version of that IP address.
A defanged IP address replaces every period "." with "[.]".
## Input and Output
Example 1:
```
Input: address = "1.1.1.1"
Output: "1[.]1[.]1[.]1"
```
Example 2:
```
Input: address = "255.100.50.0"
Output: "255[.]100[.]50[.]0"
```
## Process
I've rarely done string replacement using Java, but upon looking around the internet
for some resources, I found the `.replaceAll()` method that replaces characters in a string.
Using this method, I was able to replace the `.`s in the given IP to `[.]`
# Code
```java
class Solution {
public String defangIPaddr(String address) {
address = address.replaceAll("\\.", "[.]");
return address;
// One liner
// return address.replaceAll("\\.", "[.]");
}
}
```
# Afterthoughts
This is a simple challenge, I'll probably try it with other languages in the near future

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"Target":"css/main.min.css","MediaType":"text/css","Data":{}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 KiB