1
0
mirror of https://github.com/avinal/avinal.github.io.git synced 2026-07-03 23:30:09 +05:30

add support for article image

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
This commit is contained in:
2022-09-15 02:04:33 +05:30
parent 770e809bd2
commit c64a15fef5
5 changed files with 159 additions and 173 deletions
+3
View File
@@ -4,6 +4,7 @@ date: 2012-02-27 22:47
tags: [ants, sav] tags: [ants, sav]
category: article category: article
description: 'The Big Red Ants' description: 'The Big Red Ants'
image: /images/ants.jpg
--- ---
# The Big Red Ants # The Big Red Ants
@@ -55,3 +56,5 @@ touch their anteena to communicate. When they walk in a queue, they seem
like twinkling dots and dashes. I want to conclude that **All tiny like twinkling dots and dashes. I want to conclude that **All tiny
things are not really tiny. It may be as a space having infinite things are not really tiny. It may be as a space having infinite
mysteries one has to explore it.** mysteries one has to explore it.**
Photo Attribution : Photo by Michael Willinger from Pexels:
+136 -144
View File
@@ -53,9 +53,9 @@ The new build system and CI brings a lot of improvements and features.
The list below describes them. The list below describes them.
- CMake enforces out-of-source builds. This was already possible with - CMake enforces out-of-source builds. This was already possible with
the previous build system but not a strict requirement. This feature the previous build system but not a strict requirement. This feature
keeps the source code clean and makes cleaning the build artifacts keeps the source code clean and makes cleaning the build artifacts
easy. (Just remove the build folder :) easy. (Just remove the build folder :)
- One of the major improvements over the previous build system is faster - One of the major improvements over the previous build system is faster
build times. CMake generates parallel build-enabled configurations for build times. CMake generates parallel build-enabled configurations for
all generators. In our tests, the new build system is at least twice all generators. In our tests, the new build system is at least twice
@@ -78,21 +78,16 @@ The list below describes them.
## Deliverables ## Deliverables
<div class="alert alert-info" role="alert"> - Final Pull Request [#2075](https://github.com/fossology/fossology/pull/2075)
<ul class="simple"> - Pull Request Branch [avinal/feat/buildsystem](https://github.com/avinal/fossology/tree/avinal/feat/buildsystem)
<li>Final Pull Request <a class="badge badge-info" href="https://github.com/fossology/fossology/pull/2075">#2075</a></li> - Working Branch (individual commits)
<li>Pull Request Branch <a class="badge badge-info" href="https://github.com/avinal/fossology/tree/avinal/feat/buildsystem">avinal/feat/buildsystem</a></li> - [avinal/feat/cmake-buildsystem](https://github.com/avinal/fossology/tree/avinal/feat/cmake-buildsystem)
<li>Working Branch (individual commits) <ul> - [avinal/feat/testing](https://github.com/avinal/fossology/tree/avinal/feat/testing)
<li><a class="badge badge-info" href="https://github.com/avinal/fossology/tree/avinal/feat/cmake-buildsystem">avinal/feat/cmake-buildsystem</a></li> - Project Issue [#1913](https://github.com/fossology/fossology/issues/1913)
<li><a class="badge badge-info" href="https://github.com/avinal/fossology/tree/avinal/feat/testing">avinal/feat/testing</a></li> - Project Discussion [#1931](https://github.com/fossology/fossology/discussions/1931)
</ul></li> - Weekly Reports
<li>Project Issue <a class="badge badge-info" href="https://github.com/fossology/fossology/issues/1913">#1913</a></li> - [Personal Blog](https://gsoc.avinal.space)
<li>Project Discussion <a class="badge badge-info" href="https://github.com/fossology/fossology/discussions/1931">#1931</a></li> - [FOSSology Official Blog](https://fossology.github.io/gsoc/docs/2021/buildsystem/)
<li>Weekly Reports<ul>
<li><a class="badge badge-info" href="https://gsoc.avinal.space">Personal Blog</a></li>
<li><a class="badge badge-info" href="https://fossology.github.io/gsoc/docs/2021/buildsystem/">FOSSology Official Blog</a></li>
</ul></li></ul>
</div>
### CMake Build System Tasks ### CMake Build System Tasks
@@ -564,129 +559,129 @@ described below.
[#2075](https://github.com/fossology/fossology/pull/2075) pull [#2075](https://github.com/fossology/fossology/pull/2075) pull
request branch. Once you are in FOSSology root, run these commands. request branch. Once you are in FOSSology root, run these commands.
> ```bash ```bash
> git fetch https://github.com/avinal/fossology avinal/feat/buildsystem:buildsystem git fetch https://github.com/avinal/fossology avinal/feat/buildsystem:buildsystem
> git checkout buildsystem git checkout buildsystem
> ``` ```
2. The first step towards building is to create a temporary directory 2. The first step towards building is to create a temporary directory
for storing intermediate files and build artifacts. By convention we for storing intermediate files and build artifacts. By convention we
use a directory named `build`, but you can use any name. (**NOTE: use a directory named `build`, but you can use any name. (**NOTE:
For testing do not use other names**) For testing do not use other names**)
> ```bash ```bash
> mkdir build mkdir build
> cd build cd build
> ``` ```
3. In the next steps, we will configure the CMake project and generate 3. In the next steps, we will configure the CMake project and generate
the required configurations. You can use several flags to control the required configurations. You can use several flags to control
the build. Given below are the flags available for this project. the build. Given below are the flags available for this project.
> <table style="width:99%;"> <table style="width:99%;">
> <colgroup> <colgroup>
> <col style="width: 34%" /> <col style="width: 34%" />
> <col style="width: 43%" /> <col style="width: 43%" />
> <col style="width: 20%" /> <col style="width: 20%" />
> </colgroup> </colgroup>
> <thead> <thead>
> <tr class="header"> <tr class="header">
> <th>CMake Flags</th> <th>CMake Flags</th>
> <th>Description</th> <th>Description</th>
> <th>Default</th> <th>Default</th>
> </tr> </tr>
> </thead> </thead>
> <tbody> <tbody>
> <tr class="odd"> <tr class="odd">
> <td><strong>-DCMAKE_INSTALL_PREFIX=&lt;path&gt;</strong></td> <td><strong>-DCMAKE_INSTALL_PREFIX=&lt;path&gt;</strong></td>
> <td>Sets the install prefix.</td> <td>Sets the install prefix.</td>
> <td><code>/usr/local</code></td> <td><code>/usr/local</code></td>
> </tr> </tr>
> <tr class="even"> <tr class="even">
> <td><strong>-DAGENTS="agent1;agent2..."</strong></td> <td><strong>-DAGENTS="agent1;agent2..."</strong></td>
> <td>Only configure these agents.</td> <td>Only configure these agents.</td>
> <td>ALL AGENTS</td> <td>ALL AGENTS</td>
> </tr> </tr>
> <tr class="odd"> <tr class="odd">
> <td><strong>-DOFFLINE=&lt;ON/OFF&gt;</strong></td> <td><strong>-DOFFLINE=&lt;ON/OFF&gt;</strong></td>
> <td>Controls vendor generation, ON=NO</td> <td>Controls vendor generation, ON=NO</td>
> <td><strong>OFF</strong></td> <td><strong>OFF</strong></td>
> </tr> </tr>
> <tr class="even"> <tr class="even">
> <td><p><strong>-DCMAKE_BUILD_TYPE=&lt;type&gt;</strong></p> <td><p><strong>-DCMAKE_BUILD_TYPE=&lt;type&gt;</strong></p>
> <blockquote> <blockquote>
> <ul> <ul>
> <li>Controls build type aka level optimisation</li> <li>Controls build type aka level optimisation</li>
> </ul> </ul>
> </blockquote></td> </blockquote></td>
> <td><ul> <td><ul>
> <li><code>Debug</code></li> <li><code>Debug</code></li>
> <li><code>Release</code></li> <li><code>Release</code></li>
> <li><code>RelWithDebInfo</code></li> <li><code>RelWithDebInfo</code></li>
> <li><code>MinSizeRel</code></li> <li><code>MinSizeRel</code></li>
> </ul></td> </ul></td>
> <td><code>Debug</code></td> <td><code>Debug</code></td>
> </tr> </tr>
> <tr class="odd"> <tr class="odd">
> <td><strong>-DTESTING=&lt;ON/OFF&gt;</strong></td> <td><strong>-DTESTING=&lt;ON/OFF&gt;</strong></td>
> <td>Controls testing config generation</td> <td>Controls testing config generation</td>
> <td><blockquote> <td><blockquote>
> <p><strong>OFF</strong></p> <p><strong>OFF</strong></p>
> </blockquote></td> </blockquote></td>
> </tr> </tr>
> <tr class="even"> <tr class="even">
> <td><strong>-DMONOPACK=&lt;ON/OFF&gt;</strong></td> <td><strong>-DMONOPACK=&lt;ON/OFF&gt;</strong></td>
> <td>Package adj2nest and ununpack seperately</td> <td>Package adj2nest and ununpack seperately</td>
> <td><strong>OFF</strong></td> <td><strong>OFF</strong></td>
> </tr> </tr>
> <tr class="odd"> <tr class="odd">
> <td><strong>-GNinja</strong></td> <td><strong>-GNinja</strong></td>
> <td>Use Ninja instead of Unix Makefiles</td> <td>Use Ninja instead of Unix Makefiles</td>
> <td><em>Unix MakeFiles</em></td> <td><em>Unix MakeFiles</em></td>
> </tr> </tr>
> </tbody> </tbody>
> </table> </table>
>
> There are lots of inbuilt CMake command-line options you can see There are lots of inbuilt CMake command-line options you can see
> them in the official them in the official
> [documentation](https://cmake.org/cmake/help/v3.10/manual/cmake.1.html). [documentation](https://cmake.org/cmake/help/v3.10/manual/cmake.1.html).
> Once you have chosen your flags we can now configure the project Once you have chosen your flags we can now configure the project
> using the following commands. using the following commands.
>
> ```bash ```bash
> # From build folder # From build folder
> cd <name-of-build-directory> cd <name-of-build-directory>
> cmake <flags> .. cmake <flags> ..
> ``` ```
4. The next step is to build the project. You can use parallel jobs to 4. The next step is to build the project. You can use parallel jobs to
build faster. For more options you can type `cmake --help` or build faster. For more options you can type `cmake --help` or
`make --help` or `ninja --help`. `make --help` or `ninja --help`.
> ```bash ```bash
> # Common build command for all generators, # Common build command for all generators,
> # Default number of parallel builds depends on generator used # Default number of parallel builds depends on generator used
> cmake --build . --parallel <no-of-processes> cmake --build . --parallel <no-of-processes>
>
> # For Unix Makefiles, no parallel build by default # For Unix Makefiles, no parallel build by default
> make -j <no-of-processes> make -j <no-of-processes>
>
> # For Ninja, 8+ parallel build by default (depends on system) # For Ninja, 8+ parallel build by default (depends on system)
> ninja -j <no-of-processes> ninja -j <no-of-processes>
> ``` ```
5. Installing is also as easy as building. You can choose to install 5. Installing is also as easy as building. You can choose to install
only certain components even if you have built the whole project. If only certain components even if you have built the whole project. If
you directly invoke the install command without building the you directly invoke the install command without building the
project, it will automatically build the project first. project, it will automatically build the project first.
> ```bash ```bash
> # For Unix Makefiles # For Unix Makefiles
> make install make install
>
> # For Ninja # For Ninja
> ninja install ninja install
> ``` ```
6. While testing has some issues, most of the testing is working fine. 6. While testing has some issues, most of the testing is working fine.
For now, you must build and run any test from the FOSSology root For now, you must build and run any test from the FOSSology root
@@ -694,16 +689,16 @@ described below.
want to test one agent only. See `ctest --help` for controlling test want to test one agent only. See `ctest --help` for controlling test
runs. runs.
> ```bash ```bash
> # Common testing command # Common testing command
> ctest --parallel <no-of-processes> ctest --parallel <no-of-processes>
>
> # For Unix Makefiles # For Unix Makefiles
> make test make test
>
> # For Ninja # For Ninja
> ninja test ninja test
> ``` ```
7. You can package FOSSology, the packaging currently lacks copyright 7. You can package FOSSology, the packaging currently lacks copyright
and conf files. But for testing purposes, you can use the following and conf files. But for testing purposes, you can use the following
@@ -711,16 +706,16 @@ described below.
without building the project, it will automatically build the without building the project, it will automatically build the
project first. See `cpack --help` for more packaging options. project first. See `cpack --help` for more packaging options.
> ```bash ```bash
> # Common testing command # Common testing command
> cpack cpack
>
> # For Unix Makefiles # For Unix Makefiles
> make package make package
>
> # For Ninja # For Ninja
> ninja package ninja package
> ``` ```
## Known Issues and Drawbacks ## Known Issues and Drawbacks
@@ -729,9 +724,7 @@ Actions is almost complete and working as expected. But it is not free
of drawbacks and issues. This section outlines the known issues at the of drawbacks and issues. This section outlines the known issues at the
time of writing. time of writing.
<img src="https://imgs.xkcd.com/comics/conference_question.png" ![A Bug Meme](https://imgs.xkcd.com/comics/conference_question.png)
class="float-md-right rounded border border-info ml-3 float-md-right rounded border border-info ml-3"
width="350" alt="A Bug Meme" />
- Coverage builds may fail with linking errors. - Coverage builds may fail with linking errors.
- Packaging prefix is the same as the install prefix. This requires the - Packaging prefix is the same as the install prefix. This requires the
@@ -759,8 +752,7 @@ width="350" alt="A Bug Meme" />
[#2084](https://github.com/fossology/fossology/issues/2084) to track [#2084](https://github.com/fossology/fossology/issues/2084) to track
the progress on fixing these tests. the progress on fixing these tests.
- CMake doesn't generate uninstall targets. The closest thing to - CMake doesn't generate uninstall targets. The closest thing to
uninstall is [this uninstall is [this snippet](https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#can-i-do-make-uninstall-with-cmake).
snippet](https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#can-i-do-make-uninstall-with-cmake).
This will be later added to the FOSSology. This will be later added to the FOSSology.
## Challenges Faced ## Challenges Faced
@@ -42,8 +42,7 @@ Kubernetes. We were provided plenty of good resources and my teammates
also helped with many awesome resources. I am listing all the resources also helped with many awesome resources. I am listing all the resources
with their category. with their category.
### [Golang](https://go.dev/) ### Go Programming Language
One of Golang's biggest advantages is that it offers the clarity and One of Golang's biggest advantages is that it offers the clarity and
ease of use that other languages lack. Golang's advantages make it easy ease of use that other languages lack. Golang's advantages make it easy
@@ -66,7 +65,7 @@ veterans to easily read each other's code.
Nana](https://youtu.be/yyUHQIec83I) *if you prefer video tutorials, I Nana](https://youtu.be/yyUHQIec83I) *if you prefer video tutorials, I
don't :)* don't :)*
### [Docker](https://www.docker.com/) ### Docker
Docker takes away repetitive, mundane configuration tasks and is used Docker takes away repetitive, mundane configuration tasks and is used
throughout the development lifecycle for fast, easy, and portable throughout the development lifecycle for fast, easy, and portable
@@ -75,9 +74,7 @@ end-to-end platform includes UIs, CLIs, APIs, and security that are
engineered to work together across the entire application delivery engineered to work together across the entire application delivery
lifecycle. lifecycle.
<img src="/images/docker-architecture.png" ![The Docker Architecture](/images/docker-architecture.png)
class="float-md-right img-fluid my-3 float-md-right img-fluid my-3"
alt="The Docker Architecture" />
- [Docker and Containers - - [Docker and Containers -
Katacoda](https://www.katacoda.com/courses/docker) *interactive Katacoda](https://www.katacoda.com/courses/docker) *interactive
@@ -86,11 +83,9 @@ alt="The Docker Architecture" />
- [Docker Tutorial for Beginners | TechWorld with - [Docker Tutorial for Beginners | TechWorld with
Nana](https://youtu.be/3c-iBn73dDE) *video tutorial* Nana](https://youtu.be/3c-iBn73dDE) *video tutorial*
### [Kubernetes](https://kubernetes.io/) ### Kubernetes
<img src="/images/kubernetes-meme.png" ![Kubernetes tech](/images/kubernetes-architecture.png)
class="float-md-left border mr-3 float-md-left border mr-3" width="200"
alt="Kubernetes tech" />
**Kubernetes** is the Greek word for a ship's captain. We get the words **Kubernetes** is the Greek word for a ship's captain. We get the words
Cybernetic and Gubernatorial from it. The Kubernetes project focuses on Cybernetic and Gubernatorial from it. The Kubernetes project focuses on
+4 -1
View File
@@ -3,6 +3,7 @@ title: How I implemented WakaTime embeddable Coding Graph GHA?
date: 2021-02-02 21:47 date: 2021-02-02 21:47
tags: [wakatime, github-action, coding] tags: [wakatime, github-action, coding]
category: development category: development
image: https://raw.githubusercontent.com/avinal/Profile-Readme-WakaTime/b281d074ee75f9626b39d10e2e518c6a297208a3/waka.png
description: 'If you use WakaTime to track your coding activity. You can add that to description: 'If you use WakaTime to track your coding activity. You can add that to
your README as a bar graph or embed it in your blog/portfolio. Just add this your README as a bar graph or embed it in your blog/portfolio. Just add this
action to any of your repositories and there you have it.' action to any of your repositories and there you have it.'
@@ -10,7 +11,9 @@ action to any of your repositories and there you have it.'
# How I implemented WakaTime embeddable Coding Graph GHA? # How I implemented WakaTime embeddable Coding Graph GHA?
![Profile Readme Wakatime Banner](https://raw.githubusercontent.com/avinal/Profile-Readme-WakaTime/b281d074ee75f9626b39d10e2e518c6a297208a3/waka.png) If you use WakaTime to track your coding activity. You can add that to
your README as a bar graph or embed it in your blog/portfolio. Just add this
action to any of your repositories and there you have it.
## Implementation Details ## Implementation Details
+11 -18
View File
@@ -16,28 +16,21 @@ It is real pain when you have small SSD and Windows Subsystem for Linux
WSL installation to another drive. Here in this blog I will discuss how WSL installation to another drive. Here in this blog I will discuss how
to tackle this problem with bite size steps. to tackle this problem with bite size steps.
1. Open a PowerShell 1. Open a PowerShell or Command Prompt with *Admin* access. For this you can
<img src="/images/powershell.png" class="align-middle" use WinKey + X shortcut and select **Windows PowerShell(Admin)**.
style="width:5.0%" alt="powershell" /> or Command Prompt
<img src="/images/command-line.png" class="align-middle"
style="width:5.0%" alt="command-line" /> with *Admin* access. For
this you can use
<img src="/images/windows10.png" class="align-middle" style="width:5.0%"
alt="WinKey" /> + X shortcut and select **Windows
PowerShell(Admin)**.
2. Check if the WSL 2 installation you are planning to move is is 2. Check if the WSL 2 installation you are planning to move is is
currently running/stopped. currently running/stopped.
```powershell ```powershell
PS C:\\Users\\Avinal> wsl -l -v PS C:\\Users\\Avinal> wsl -l -v
PS C:\\Users\\Avinal> PS C:\\Users\\Avinal>
NAME STATE VERSION NAME STATE VERSION
* Ubuntu Running 2 * Ubuntu Running 2
Kali Stopped 2 Kali Stopped 2
``` ```
3. If its running then you must stop the particular WSL distribution. 3. If its running then you must stop the particular WSL distribution.
(*Ubuntu* used as example) (*Ubuntu* used as example)
```powershell ```powershell
PS C:\\Users\\Avinal> wsl -t Ubuntu PS C:\\Users\\Avinal> wsl -t Ubuntu