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]
category: article
description: 'The Big Red Ants'
image: /images/ants.jpg
---
# 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
things are not really tiny. It may be as a space having infinite
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.
- CMake enforces out-of-source builds. This was already possible with
the previous build system but not a strict requirement. This feature
keeps the source code clean and makes cleaning the build artifacts
easy. (Just remove the build folder :)
the previous build system but not a strict requirement. This feature
keeps the source code clean and makes cleaning the build artifacts
easy. (Just remove the build folder :)
- One of the major improvements over the previous build system is faster
build times. CMake generates parallel build-enabled configurations for
all generators. In our tests, the new build system is at least twice
@@ -78,21 +78,16 @@ The list below describes them.
## Deliverables
<div class="alert alert-info" role="alert">
<ul class="simple">
<li>Final Pull Request <a class="badge badge-info" href="https://github.com/fossology/fossology/pull/2075">#2075</a></li>
<li>Pull Request Branch <a class="badge badge-info" href="https://github.com/avinal/fossology/tree/avinal/feat/buildsystem">avinal/feat/buildsystem</a></li>
<li>Working Branch (individual commits) <ul>
<li><a class="badge badge-info" href="https://github.com/avinal/fossology/tree/avinal/feat/cmake-buildsystem">avinal/feat/cmake-buildsystem</a></li>
<li><a class="badge badge-info" href="https://github.com/avinal/fossology/tree/avinal/feat/testing">avinal/feat/testing</a></li>
</ul></li>
<li>Project Issue <a class="badge badge-info" href="https://github.com/fossology/fossology/issues/1913">#1913</a></li>
<li>Project Discussion <a class="badge badge-info" href="https://github.com/fossology/fossology/discussions/1931">#1931</a></li>
<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>
- Final Pull Request [#2075](https://github.com/fossology/fossology/pull/2075)
- Pull Request Branch [avinal/feat/buildsystem](https://github.com/avinal/fossology/tree/avinal/feat/buildsystem)
- Working Branch (individual commits)
- [avinal/feat/cmake-buildsystem](https://github.com/avinal/fossology/tree/avinal/feat/cmake-buildsystem)
- [avinal/feat/testing](https://github.com/avinal/fossology/tree/avinal/feat/testing)
- Project Issue [#1913](https://github.com/fossology/fossology/issues/1913)
- Project Discussion [#1931](https://github.com/fossology/fossology/discussions/1931)
- Weekly Reports
- [Personal Blog](https://gsoc.avinal.space)
- [FOSSology Official Blog](https://fossology.github.io/gsoc/docs/2021/buildsystem/)
### CMake Build System Tasks
@@ -564,129 +559,129 @@ described below.
[#2075](https://github.com/fossology/fossology/pull/2075) pull
request branch. Once you are in FOSSology root, run these commands.
> ```bash
> git fetch https://github.com/avinal/fossology avinal/feat/buildsystem:buildsystem
> git checkout buildsystem
> ```
```bash
git fetch https://github.com/avinal/fossology avinal/feat/buildsystem:buildsystem
git checkout buildsystem
```
2. The first step towards building is to create a temporary directory
for storing intermediate files and build artifacts. By convention we
use a directory named `build`, but you can use any name. (**NOTE:
For testing do not use other names**)
> ```bash
> mkdir build
> cd build
> ```
```bash
mkdir build
cd build
```
3. In the next steps, we will configure the CMake project and generate
the required configurations. You can use several flags to control
the build. Given below are the flags available for this project.
> <table style="width:99%;">
> <colgroup>
> <col style="width: 34%" />
> <col style="width: 43%" />
> <col style="width: 20%" />
> </colgroup>
> <thead>
> <tr class="header">
> <th>CMake Flags</th>
> <th>Description</th>
> <th>Default</th>
> </tr>
> </thead>
> <tbody>
> <tr class="odd">
> <td><strong>-DCMAKE_INSTALL_PREFIX=&lt;path&gt;</strong></td>
> <td>Sets the install prefix.</td>
> <td><code>/usr/local</code></td>
> </tr>
> <tr class="even">
> <td><strong>-DAGENTS="agent1;agent2..."</strong></td>
> <td>Only configure these agents.</td>
> <td>ALL AGENTS</td>
> </tr>
> <tr class="odd">
> <td><strong>-DOFFLINE=&lt;ON/OFF&gt;</strong></td>
> <td>Controls vendor generation, ON=NO</td>
> <td><strong>OFF</strong></td>
> </tr>
> <tr class="even">
> <td><p><strong>-DCMAKE_BUILD_TYPE=&lt;type&gt;</strong></p>
> <blockquote>
> <ul>
> <li>Controls build type aka level optimisation</li>
> </ul>
> </blockquote></td>
> <td><ul>
> <li><code>Debug</code></li>
> <li><code>Release</code></li>
> <li><code>RelWithDebInfo</code></li>
> <li><code>MinSizeRel</code></li>
> </ul></td>
> <td><code>Debug</code></td>
> </tr>
> <tr class="odd">
> <td><strong>-DTESTING=&lt;ON/OFF&gt;</strong></td>
> <td>Controls testing config generation</td>
> <td><blockquote>
> <p><strong>OFF</strong></p>
> </blockquote></td>
> </tr>
> <tr class="even">
> <td><strong>-DMONOPACK=&lt;ON/OFF&gt;</strong></td>
> <td>Package adj2nest and ununpack seperately</td>
> <td><strong>OFF</strong></td>
> </tr>
> <tr class="odd">
> <td><strong>-GNinja</strong></td>
> <td>Use Ninja instead of Unix Makefiles</td>
> <td><em>Unix MakeFiles</em></td>
> </tr>
> </tbody>
> </table>
>
> There are lots of inbuilt CMake command-line options you can see
> them in the official
> [documentation](https://cmake.org/cmake/help/v3.10/manual/cmake.1.html).
> Once you have chosen your flags we can now configure the project
> using the following commands.
>
> ```bash
> # From build folder
> cd <name-of-build-directory>
> cmake <flags> ..
> ```
<table style="width:99%;">
<colgroup>
<col style="width: 34%" />
<col style="width: 43%" />
<col style="width: 20%" />
</colgroup>
<thead>
<tr class="header">
<th>CMake Flags</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><strong>-DCMAKE_INSTALL_PREFIX=&lt;path&gt;</strong></td>
<td>Sets the install prefix.</td>
<td><code>/usr/local</code></td>
</tr>
<tr class="even">
<td><strong>-DAGENTS="agent1;agent2..."</strong></td>
<td>Only configure these agents.</td>
<td>ALL AGENTS</td>
</tr>
<tr class="odd">
<td><strong>-DOFFLINE=&lt;ON/OFF&gt;</strong></td>
<td>Controls vendor generation, ON=NO</td>
<td><strong>OFF</strong></td>
</tr>
<tr class="even">
<td><p><strong>-DCMAKE_BUILD_TYPE=&lt;type&gt;</strong></p>
<blockquote>
<ul>
<li>Controls build type aka level optimisation</li>
</ul>
</blockquote></td>
<td><ul>
<li><code>Debug</code></li>
<li><code>Release</code></li>
<li><code>RelWithDebInfo</code></li>
<li><code>MinSizeRel</code></li>
</ul></td>
<td><code>Debug</code></td>
</tr>
<tr class="odd">
<td><strong>-DTESTING=&lt;ON/OFF&gt;</strong></td>
<td>Controls testing config generation</td>
<td><blockquote>
<p><strong>OFF</strong></p>
</blockquote></td>
</tr>
<tr class="even">
<td><strong>-DMONOPACK=&lt;ON/OFF&gt;</strong></td>
<td>Package adj2nest and ununpack seperately</td>
<td><strong>OFF</strong></td>
</tr>
<tr class="odd">
<td><strong>-GNinja</strong></td>
<td>Use Ninja instead of Unix Makefiles</td>
<td><em>Unix MakeFiles</em></td>
</tr>
</tbody>
</table>
There are lots of inbuilt CMake command-line options you can see
them in the official
[documentation](https://cmake.org/cmake/help/v3.10/manual/cmake.1.html).
Once you have chosen your flags we can now configure the project
using the following commands.
```bash
# From build folder
cd <name-of-build-directory>
cmake <flags> ..
```
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
`make --help` or `ninja --help`.
> ```bash
> # Common build command for all generators,
> # Default number of parallel builds depends on generator used
> cmake --build . --parallel <no-of-processes>
>
> # For Unix Makefiles, no parallel build by default
> make -j <no-of-processes>
>
> # For Ninja, 8+ parallel build by default (depends on system)
> ninja -j <no-of-processes>
> ```
```bash
# Common build command for all generators,
# Default number of parallel builds depends on generator used
cmake --build . --parallel <no-of-processes>
# For Unix Makefiles, no parallel build by default
make -j <no-of-processes>
# For Ninja, 8+ parallel build by default (depends on system)
ninja -j <no-of-processes>
```
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
you directly invoke the install command without building the
project, it will automatically build the project first.
> ```bash
> # For Unix Makefiles
> make install
>
> # For Ninja
> ninja install
> ```
```bash
# For Unix Makefiles
make install
# For Ninja
ninja install
```
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
@@ -694,16 +689,16 @@ described below.
want to test one agent only. See `ctest --help` for controlling test
runs.
> ```bash
> # Common testing command
> ctest --parallel <no-of-processes>
>
> # For Unix Makefiles
> make test
>
> # For Ninja
> ninja test
> ```
```bash
# Common testing command
ctest --parallel <no-of-processes>
# For Unix Makefiles
make test
# For Ninja
ninja test
```
7. You can package FOSSology, the packaging currently lacks copyright
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
project first. See `cpack --help` for more packaging options.
> ```bash
> # Common testing command
> cpack
>
> # For Unix Makefiles
> make package
>
> # For Ninja
> ninja package
> ```
```bash
# Common testing command
cpack
# For Unix Makefiles
make package
# For Ninja
ninja package
```
## 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
time of writing.
<img src="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" />
![A Bug Meme](https://imgs.xkcd.com/comics/conference_question.png)
- Coverage builds may fail with linking errors.
- 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
the progress on fixing these tests.
- CMake doesn't generate uninstall targets. The closest thing to
uninstall is [this
snippet](https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#can-i-do-make-uninstall-with-cmake).
uninstall is [this snippet](https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#can-i-do-make-uninstall-with-cmake).
This will be later added to the FOSSology.
## 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
with their category.
### [Golang](https://go.dev/)
### Go Programming Language
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
@@ -66,7 +65,7 @@ veterans to easily read each other's code.
Nana](https://youtu.be/yyUHQIec83I) *if you prefer video tutorials, I
don't :)*
### [Docker](https://www.docker.com/)
### Docker
Docker takes away repetitive, mundane configuration tasks and is used
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
lifecycle.
<img src="/images/docker-architecture.png"
class="float-md-right img-fluid my-3 float-md-right img-fluid my-3"
alt="The Docker Architecture" />
![The Docker Architecture](/images/docker-architecture.png)
- [Docker and Containers -
Katacoda](https://www.katacoda.com/courses/docker) *interactive
@@ -86,11 +83,9 @@ alt="The Docker Architecture" />
- [Docker Tutorial for Beginners | TechWorld with
Nana](https://youtu.be/3c-iBn73dDE) *video tutorial*
### [Kubernetes](https://kubernetes.io/)
### Kubernetes
<img src="/images/kubernetes-meme.png"
class="float-md-left border mr-3 float-md-left border mr-3" width="200"
alt="Kubernetes tech" />
![Kubernetes tech](/images/kubernetes-architecture.png)
**Kubernetes** is the Greek word for a ship's captain. We get the words
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
tags: [wakatime, github-action, coding]
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
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.'
@@ -10,7 +11,9 @@ action to any of your repositories and there you have it.'
# 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
+9 -16
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
to tackle this problem with bite size steps.
1. Open a PowerShell
<img src="/images/powershell.png" class="align-middle"
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)**.
1. Open a PowerShell or Command Prompt with *Admin* access. For this you can
use WinKey + X shortcut and select **Windows PowerShell(Admin)**.
2. Check if the WSL 2 installation you are planning to move is is
currently running/stopped.
currently running/stopped.
```powershell
PS C:\\Users\\Avinal> wsl -l -v
PS C:\\Users\\Avinal>
```powershell
PS C:\\Users\\Avinal> wsl -l -v
PS C:\\Users\\Avinal>
NAME STATE VERSION
* Ubuntu Running 2
* Ubuntu Running 2
Kali Stopped 2
```
```
3. If its running then you must stop the particular WSL distribution.
(*Ubuntu* used as example)
(*Ubuntu* used as example)
```powershell
PS C:\\Users\\Avinal> wsl -t Ubuntu