Added and Modified Lots of stuff
This commit is contained in:
parent
bb450fa6b2
commit
e22eae817c
|
@ -1,5 +1,6 @@
|
|||
baseURL = "https://devoalda.gitlab.io/"
|
||||
title = "Devoalda"
|
||||
# baseURL = "https://devoalda.gitlab.io/"
|
||||
baseURL = "https://devblog.periodicc.com/"
|
||||
title = "Devblog"
|
||||
theme = "zzo"
|
||||
|
||||
defaultContentLanguage = "en"
|
||||
|
@ -12,7 +13,7 @@ enableRobotsTXT = true
|
|||
summaryLength = 70
|
||||
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
|
||||
enableEmoji = true
|
||||
paginate = 13
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[en]
|
||||
title = "Devoalda"
|
||||
title = "Devblog"
|
||||
languageName = "English"
|
||||
weight = 1
|
||||
languagedir = "ltr"
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
url = "gallery"
|
||||
weight = 5
|
||||
|
||||
[[main]]
|
||||
parent = "gallery"
|
||||
name = "Mysterio"
|
||||
url = "gallery/mysterio"
|
||||
|
||||
[[main]]
|
||||
parent = "gallery"
|
||||
name = "Carnage"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
logoText = "Devoalda"
|
||||
logoText = "Devblog"
|
||||
logoType = "short" # long, short
|
||||
logo = true
|
||||
description = "Don't like it? Do it yourself!"
|
||||
|
@ -44,13 +44,13 @@ pubPaginate = 20
|
|||
|
||||
# whoami
|
||||
myname = "Devoalda"
|
||||
email = "woonjunwei@protonmail.com"
|
||||
email = "inktablet_enzymatic@aleeas.com"
|
||||
whoami = "Programmer🤓Hacker🖥Tinkerer🧠"
|
||||
bioImageUrl = ""
|
||||
useGravatar = false
|
||||
location = ""
|
||||
organization = ""
|
||||
link = "https://devoalda.gitlab.io/"
|
||||
link = "https://devblog.periodicc.com"
|
||||
|
||||
# sidebar
|
||||
enableBio = true
|
||||
|
@ -124,7 +124,7 @@ commento = false
|
|||
clientSecret = "" # Your client secret
|
||||
|
||||
[socialOptions]
|
||||
email = "mailto:woonjunwei@protonmail.com"
|
||||
email = "mailto:inktablet_enzymatic@aleeas.com"
|
||||
phone = ""
|
||||
facebook = ""
|
||||
twitter = ""
|
||||
|
|
|
@ -6,7 +6,7 @@ header:
|
|||
paddingY: 0
|
||||
align: center
|
||||
title:
|
||||
- Devoalda
|
||||
- Devblog
|
||||
subtitle:
|
||||
- Don't like it? Do it yourself!
|
||||
titleColor:
|
||||
|
@ -41,13 +41,13 @@ header:
|
|||
- type: slide
|
||||
height: 235
|
||||
options:
|
||||
startSlide: 0
|
||||
auto: 5000
|
||||
draggable: true
|
||||
autoRestart: true
|
||||
continuous: true
|
||||
disableScroll: true
|
||||
stopPropagation: true
|
||||
startSlide: 0
|
||||
auto: 5000
|
||||
draggable: true
|
||||
autoRestart: true
|
||||
continuous: true
|
||||
disableScroll: true
|
||||
stopPropagation: true
|
||||
slide:
|
||||
- paddingX: 50
|
||||
paddingY: 0
|
||||
|
|
|
@ -6,61 +6,74 @@ date = "05-07-2020"
|
|||
+++
|
||||
|
||||
# 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.
|
||||
|
||||
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
|
||||
``` bash
|
||||
curl -sL https://devoalda.gitlab.io/business_card
|
||||
|
||||
```bash
|
||||
curl -sL https://devblog.periodicc.com/business_card
|
||||
```
|
||||
|
||||
# System Information
|
||||

|
||||
|
||||

|
||||
|
||||
These are my system information on my daily driver.
|
||||
|
||||
- Distribution: Arch Linux
|
||||
- Window Manager: Xmonad
|
||||
- Status Bar: Xmobar
|
||||
- Distribution: EndeavourOS
|
||||
- Window Manager: KDE
|
||||
|
||||
# Programming
|
||||
A hobbyist programmer with experience and interests in:
|
||||
* Python
|
||||
* Bash
|
||||
* Golang
|
||||
* Markdown
|
||||
* Java
|
||||
* C#
|
||||
* ASP.Net
|
||||
|
||||
A hobbyist programmer with interests in:
|
||||
|
||||
- Python
|
||||
- Markdown
|
||||
- LaTex
|
||||
- Java
|
||||
- C
|
||||
- Bash
|
||||
- ASP.Net
|
||||
|
||||
# Linux & System Administration
|
||||
|
||||
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
|
||||
* Manjaro
|
||||
* Arch Linux _i use arch btw_
|
||||
- Debian Variants
|
||||
|
||||
* RHEL Variants
|
||||
* CentOS
|
||||
- Debian
|
||||
- Proxmox
|
||||
- Ubuntu
|
||||
- Raspbian
|
||||
- Linux mint
|
||||
- Kali Linux
|
||||
- Parrot Security OS
|
||||
- Tails OS
|
||||
|
||||
* BSD Variants
|
||||
* FreeNAS
|
||||
- Arch Variants
|
||||
|
||||
- EndeavourOS
|
||||
- Arch Linux _i use arch btw_
|
||||
- Manjaro
|
||||
|
||||
- RHEL Variants
|
||||
|
||||
- CentOS
|
||||
|
||||
- BSD Variants
|
||||
- FreeNAS
|
||||
|
||||
# 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.
|
||||
|
||||
### 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.
|
||||
|
||||
_Do check it out!_
|
||||
|
@ -69,44 +82,44 @@ _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
|
||||
|
||||
* Notepad++
|
||||
- Web Development(HTML,CSS,JS)
|
||||
* Eclipse
|
||||
- Java & Javafx Development
|
||||
* IntelliJ IDEA
|
||||
- Java & Javafx Development
|
||||
* Visual Studio
|
||||
- C#, ASP.Net
|
||||
* Pycharm
|
||||
- Python Scripting
|
||||
* Visual Studio Code
|
||||
- Python & Bash Scripting
|
||||
* Vim/Neovim
|
||||
- Python & Bash Scripting
|
||||
- Java Terminal Applications
|
||||
- Golang Terminal Applications
|
||||
- Notepad++
|
||||
- Web Development(HTML,CSS,JS)
|
||||
- Eclipse
|
||||
- Java & Javafx Development
|
||||
- IntelliJ IDEA
|
||||
- Java & Javafx Development
|
||||
- Visual Studio
|
||||
- C#, ASP.Net
|
||||
- Pycharm
|
||||
- Python Scripting
|
||||
- Visual Studio Code
|
||||
- Python & Bash Scripting
|
||||
- Vim/Neovim
|
||||
- Python & Bash Scripting
|
||||
- Java Terminal Applications
|
||||
- Golang Terminal Applications
|
||||
|
||||
# Virtualization/Virtual Machine Managers
|
||||
|
||||
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:
|
||||
|
||||
* Vmware player/workstation
|
||||
* EXSI
|
||||
* VirtualBox
|
||||
* Proxmox
|
||||
* FreeNAS(bhyve)
|
||||
- Vmware player/workstation
|
||||
- EXSI
|
||||
- VirtualBox
|
||||
- Proxmox
|
||||
- FreeNAS(bhyve)
|
||||
|
||||
# Hardware
|
||||
|
||||
Here are some of the computer hardware which I have played with in the past:
|
||||
|
||||
* Raspberry Pi 3b+ & 4b
|
||||
* My current desktop (Dell Optiplex 7010)
|
||||
- Raspberry Pi 3b+ & 4b
|
||||
|
||||
__Thanks for checking out my website!__
|
||||
**Thanks for checking out my website!**
|
||||
|
||||
# Credits
|
||||
|
||||
{{< expand "Credits" >}}
|
||||
[Curlable Business Card](https://github.com/tallguyjenks/BusinessCard)
|
||||
{{< /expand >}}
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
|
||||
[36m╭───────────────────────────────────────────────────────────────╮
|
||||
[36m│ │
|
||||
[36m│[0m [1m[36mWoon Jun Wei / Devoalda[0m [36m│
|
||||
[36m│ │
|
||||
[36m│[0m [4m[1mEmail:[0m [35mwoonjunwei@gmail.com [36m│
|
||||
[36m│[0m [4m[1mWeb:[0m [2mhttps://devoalda.[0m[36mgitlab.io [36m│
|
||||
[36m│ │
|
||||
[36m│[0m [4m[1mGitlab:[0m [2mhttps://gitlab.com/[0m[34mdevoalda [36m│
|
||||
[36m│[0m [4m[1mGitHub:[0m [2mhttps://github.com/[0m[32mDevoalda [36m│
|
||||
[36m│ │
|
||||
[36m│[0m [4m[1mCard:[0m [33mcurl -sL https://devoalda.gitlab.io/business_card [36m│
|
||||
[36m│ │
|
||||
[36m╰───────────────────────────────────────────────────────────────╯
|
||||
[36m╭──────────────────────────────────────────────────────────────────╮
|
||||
[36m│ │
|
||||
[36m│[0m [1m[36mWoon Jun Wei / Devoalda[0m [36m│
|
||||
[36m│ │
|
||||
[36m│[0m [4m[1mEmail:[0m [35minktablet_enzymatic@aleeas.com [36m│
|
||||
[36m│[0m [4m[1mWeb:[0m [2mhttps://devblog.[0m[36mperiodicc.com [36m│
|
||||
[36m│ │
|
||||
[36m│[0m [4m[1mGitlab:[0m [2mhttps://gitlab.com/[0m[34mdevoalda [36m│
|
||||
[36m│[0m [4m[1mGitHub:[0m [2mhttps://github.com/[0m[32mDevoalda [36m│
|
||||
[36m│ │
|
||||
[36m│[0m [4m[1mCard:[0m [33mcurl -sL https://devblog.periodicc.com/business_card [36m│
|
||||
[36m│ │
|
||||
[36m╰──────────────────────────────────────────────────────────────────╯
|
||||
|
|
|
@ -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
|
|
@ -1,9 +1,10 @@
|
|||
---
|
||||
layout: post
|
||||
title: Leetcode - Convert the temperature (2469)
|
||||
date: '2022-11-18 20:51:00 +0800'
|
||||
categories: [Code, C]
|
||||
tags: [c, leetcode] # TAG names should always be lowercase
|
||||
description: Leetcode Problem 2649 Updated
|
||||
date: '2023-02-12 08:51:00 +0800'
|
||||
categories: [Code, C, Java]
|
||||
tags: [c,java, leetcode] # TAG names should always be lowercase
|
||||
author: devoalda
|
||||
math: true
|
||||
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.
|
||||
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
|
||||
|
||||
### C
|
||||
|
||||
```c
|
||||
/**
|
||||
* 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.
|
||||
|
||||
### Java
|
||||
|
||||
```java
|
||||
class Solution {
|
||||
public double[] convertTemperature(double celsius) {
|
||||
double[] ans = {celsius + 273.15, celsius * 1.80 + 32.0};
|
||||
return ans;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# 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.
|
||||
|
||||
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.
|
||||
|
|
|
@ -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
|
@ -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 |
Loading…
Reference in New Issue