1
0
mirror of https://github.com/avinal/avinal.github.io.git synced 2026-07-04 15:50:08 +05:30

1 Commits

Author SHA1 Message Date
b3a887de94 Generate Pelican site 2022-03-19 19:37:48 +00:00
309 changed files with 28901 additions and 16246 deletions
-37
View File
@@ -1,37 +0,0 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Check build
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Default to bash
defaults:
run:
shell: bash
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: ./package-lock.json
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.134.3'
extended: true
- name: Install elm-land and node packages
run: npm install
- name: build
run: make
-13
View File
@@ -1,13 +0,0 @@
/dist
/.elm-land
/.env
/elm-stuff
/node_modules
.DS_Store
*.pem
/static/main.css
/temp
/blog/public
/blog/node_modules
.idea
.vscode
+38
View File
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>Lost in Space!</title>
<meta name="description" content="Somewhere out there beneath the pale moon light...">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Avinal">
<link rel="stylesheet" href="https://avinal.space/custom/css/space404.css" />
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.min.css'>
</head>
<body>
<div class='description' align=center>
<h1>ME CHERCHEZ-VOUS?</h1>
<p class='links' align=center>
<a class='fa fa-github-alt icon' href='https://github.com/avinal' target='_blank'></a>
<a class='fa fa-mail-forward icon' href='mailto:avinal.xlvii@gmail.com' target='_blank'></a>
</p>
</div>
<div class='solar-syst'>
<div class='sun'></div>
<div class='mercury'></div>
<div class='venus'></div>
<div class='earth'></div>
<div class='mars'></div>
<div class='jupiter'></div>
<div class='saturn'></div>
<div class='uranus'></div>
<div class='neptune'></div>
<div class='pluto'></div>
<div class='asteroids-belt'></div>
</div>
</body>
</html>
+1
View File
@@ -0,0 +1 @@
avinal.space
-373
View File
@@ -1,373 +0,0 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-27
View File
@@ -1,27 +0,0 @@
# build everything for production
all: css build
@echo "--- production build finished"
# build only css for production
css:
@echo "--- building tailwind css"
npx tailwindcss -i ./src/input.css -o ./static/main.css --minify
# compile only elm for production
build:
@echo "--- compiling elm land project"
npx elm-land build
hugo --source blog --destination ../dist --minify
# compile and watch for dev
elm-serve:
npx elm-land server
# build css and watch
css-serve:
npx tailwindcss -i ./src/input.css -o ./static/main.css --watch
# clean
clean:
rm -rf dist
rm -rf blog/public
-2
View File
@@ -1,2 +0,0 @@
# My Personal Website and Blog
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

+115
View File
@@ -0,0 +1,115 @@
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Archives | Be My SpaceTime
</title>
<link rel="canonical" href="https://avinal.space/archives.html">
<link rel="apple-touch-icon" href="https://avinal.space/apple-touch-icon.png" sizes="180x180">
<link rel="icon" type="image/png" href="https://avinal.space/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://avinal.space/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://avinal.space/site.webmanifest">
<meta name="theme-color" content="#333333">
<link rel="stylesheet" href="https://avinal.space/theme/css/bootstrap.min.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/all.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/pygments/manni.min.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/theme.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/space.css">
<link rel="alternate" type="application/atom+xml" title="Full Atom Feed" href="https://avinal.space/feeds/all.atom.xml">
</head>
<body style="font-family:Overpass Mono,monospace;">
<header class="header star">
<div id='stars'></div>
<div id='stars2'></div>
<div id='stars3'></div>
<div class="container text-center">
<div class="row">
<div class="col-sm-12">
<h1 class="title" style="font-family: ExodarOut;font-weight: lighter;"><a href="https://avinal.space/">Be My SpaceTime</a>
</h1>
<!--
<p class="text-muted">눈치</p>
-->
<ul class="list-inline">
<li class="list-inline-item"><a href="https://gsoc.avinal.space" target="_blank">gsoc</a></li>
<li class="list-inline-item text-muted">|</li>
<li class="list-inline-item"><a href="https://avinal.space/pages/about-me.html">About Me</a></li>
<li class=" list-inline-item text-muted">|</li>
<li class="list-inline-item"><a class="fab fa-github" href="https://github.com/avinal" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-linkedin" href="https://www.linkedin.com/in/avinal/" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-instagram" href="https://instagram.com/avinal.k" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-calendar" href="https://meet.avinal.space" target="_blank"></a></li>
<li class="list-inline-item"><a class="fa fa-envelope" href="mailto:blog@avinal.space" target="_blank"></a></li>
</ul>
</div>
</div> </div>
</header>
<div class="main">
<div class="container">
<h1>Archives
</h1>
<hr>
<dl class="row">
<dt class="col-sm-4">Sun 27 February 2022</dt>
<dd class="col-sm-8"><a href="https://avinal.space/posts/development/lovely-dangerous-things-redhat.html">Developing Minimal Tekton Server <a class="reference external image-reference" href="https://github.com/MiniTeks"><img alt="mks_logo" class="align-middle" src="/images/mks_logo.png" style="width: 1.5em;" /></a></a></dd>
<dt class="col-sm-4">Fri 25 February 2022</dt>
<dd class="col-sm-8"><a href="https://avinal.space/posts/development/i-am-loving-it-redhat.html">My internship at Red Hat <a class="reference external image-reference" href="https://redhat.com"><img alt="redhat_logo" class="align-middle" src="/images/redhat_logo.png" style="width: 1.5em;" /></a></a></dd>
<dt class="col-sm-4">Thu 19 August 2021</dt>
<dd class="col-sm-8"><a href="https://avinal.space/posts/report/final-evaluation.html">Google Summer of Code 2021</a></dd>
<dt class="col-sm-4">Sun 14 February 2021</dt>
<dd class="col-sm-8"><a href="https://avinal.space/posts/development/rst-guide.html">reStructuredText in GitHub</a></dd>
<dt class="col-sm-4">Tue 02 February 2021</dt>
<dd class="col-sm-8"><a href="https://avinal.space/posts/development/wakatime-readme.html">How I implemented WakaTime embeddable Coding Graph GHA?</a></dd>
<dt class="col-sm-4">Tue 26 January 2021</dt>
<dd class="col-sm-8"><a href="https://avinal.space/posts/development/twilight-blog.html">How I Created This Blog?</a></dd>
<dt class="col-sm-4">Sat 09 January 2021</dt>
<dd class="col-sm-8"><a href="https://avinal.space/posts/prime/prime1.html">Introduction to Prime Numbers</a></dd>
<dt class="col-sm-4">Mon 04 January 2021</dt>
<dd class="col-sm-8"><a href="https://avinal.space/posts/blog/hrt-interview-1.html"><abbr title="Hudson River Trading">HRT</abbr> Systems Internship Interview Experience</a></dd>
<dt class="col-sm-4">Thu 31 December 2020</dt>
<dd class="col-sm-8"><a href="https://avinal.space/posts/development/wsl1.html">Move WSL 2 Safely to another Drive</a></dd>
<dt class="col-sm-4">Tue 01 December 2020</dt>
<dd class="col-sm-8"><a href="https://avinal.space/posts/development/vlc-gsod-report.html">Create the VLC User Documentation for one Mobile Port(Android)</a></dd>
<dt class="col-sm-4">Mon 28 September 2020</dt>
<dd class="col-sm-8"><a href="https://avinal.space/posts/blog/this-is-for-you.html">The Interstellar Twilight</a></dd>
<dt class="col-sm-4">Sat 21 September 2019</dt>
<dd class="col-sm-8"><a href="https://avinal.space/posts/article/for-sunshine.html">प्रेम रतन धन पायो</a></dd>
<dt class="col-sm-4">Mon 27 February 2012</dt>
<dd class="col-sm-8"><a href="https://avinal.space/posts/article/red-big-ants.html">The Big Red Ants</a></dd>
</dl>
</div>
</div>
<footer class="footer star">
<div id='stars'></div>
<div id='stars2'></div>
<div id='stars3'></div>
<div class="container">
<div class="row">
<ul class="col-sm-6 list-inline">
<li class="list-inline-item"><a
href="https://avinal.space/archives.html">Archives</a></li>
<li class="list-inline-item"><a
href="https://avinal.space/categories.html">Categories</a></li>
<li class="list-inline-item"><a href="https://avinal.space/tags.html">Tags</a></li>
</ul>
<p class="col-sm-6 text-sm-right text-muted">Created with <i class="fa fa-heart" style="color: red;"></i> by <a
href="https://github.com/avinal" target="_blank">Avinal</a>
</p>
</div> </div>
</footer>
</body>
</html>
+214
View File
@@ -0,0 +1,214 @@
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Avinal Articles | Be My SpaceTime
</title>
<link rel="canonical" href="https://avinal.space/author/avinal.html">
<link rel="apple-touch-icon" href="https://avinal.space/apple-touch-icon.png" sizes="180x180">
<link rel="icon" type="image/png" href="https://avinal.space/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://avinal.space/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://avinal.space/site.webmanifest">
<meta name="theme-color" content="#333333">
<link rel="stylesheet" href="https://avinal.space/theme/css/bootstrap.min.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/all.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/pygments/manni.min.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/theme.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/space.css">
<link rel="alternate" type="application/atom+xml" title="Full Atom Feed" href="https://avinal.space/feeds/all.atom.xml">
</head>
<body style="font-family:Overpass Mono,monospace;">
<header class="header star">
<div id='stars'></div>
<div id='stars2'></div>
<div id='stars3'></div>
<div class="container text-center">
<div class="row">
<div class="col-sm-12">
<h1 class="title" style="font-family: ExodarOut;font-weight: lighter;"><a href="https://avinal.space/">Be My SpaceTime</a>
</h1>
<!--
<p class="text-muted">눈치</p>
-->
<ul class="list-inline">
<li class="list-inline-item"><a href="https://gsoc.avinal.space" target="_blank">gsoc</a></li>
<li class="list-inline-item text-muted">|</li>
<li class="list-inline-item"><a href="https://avinal.space/pages/about-me.html">About Me</a></li>
<li class=" list-inline-item text-muted">|</li>
<li class="list-inline-item"><a class="fab fa-github" href="https://github.com/avinal" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-linkedin" href="https://www.linkedin.com/in/avinal/" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-instagram" href="https://instagram.com/avinal.k" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-calendar" href="https://meet.avinal.space" target="_blank"></a></li>
<li class="list-inline-item"><a class="fa fa-envelope" href="mailto:blog@avinal.space" target="_blank"></a></li>
</ul>
</div>
</div> </div>
</header>
<div class="main">
<div class="container">
<h1>Avinal Articles
</h1>
<hr>
<article class="row teaser">
<header class="col-sm-4 text-muted">
<ul>
<li title="2022-02-27T20:47:00+05:30">
<i class="fas fa-clock"></i>
Sun 27 February 2022
</li>
<li>
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/development.html">development</a>
</li>
</ul>
</header>
<div class="col-sm-8">
<h4 class="title">
<a href="https://avinal.space/posts/development/lovely-dangerous-things-redhat.html">Developing Minimal Tekton Server <a class="reference external image-reference" href="https://github.com/MiniTeks"><img alt="mks_logo" class="align-middle" src="/images/mks_logo.png" style="width: 1.5em;" /></a></a>
</h4>
<div class="content">
We will be designing and implementing an application that will be talking to Tekton APIs to create resources on a Kubernetes/OpenShift Cluster.
</div>
</div>
</article>
<hr>
<article class="row teaser">
<header class="col-sm-4 text-muted">
<ul>
<li title="2022-02-25T20:47:00+05:30">
<i class="fas fa-clock"></i>
Fri 25 February 2022
</li>
<li>
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/development.html">development</a>
</li>
</ul>
</header>
<div class="col-sm-8">
<h4 class="title">
<a href="https://avinal.space/posts/development/i-am-loving-it-redhat.html">My internship at Red Hat <a class="reference external image-reference" href="https://redhat.com"><img alt="redhat_logo" class="align-middle" src="/images/redhat_logo.png" style="width: 1.5em;" /></a></a>
</h4>
<div class="content">
I made it to the Red Hat as a DevTools intern. This post is about onboarding and how I prepared myself for working on the actual project.
</div>
</div>
</article>
<hr>
<article class="row teaser">
<header class="col-sm-4 text-muted">
<ul>
<li title="2021-08-19T23:07:00+05:30">
<i class="fas fa-clock"></i>
Thu 19 August 2021
</li>
<li>
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/report.html">report</a>
</li>
</ul>
</header>
<div class="col-sm-8">
<h4 class="title">
<a href="https://avinal.space/posts/report/final-evaluation.html">Google Summer of Code 2021</a>
</h4>
<div class="content">
This is the final report of my Google Summer of Code 2021 at The FOSSology Project.
</div>
</div>
</article>
<hr>
<article class="row teaser">
<header class="col-sm-4 text-muted">
<ul>
<li title="2021-02-14T22:47:00+05:30">
<i class="fas fa-clock"></i>
Sun 14 February 2021
</li>
<li>
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/development.html">development</a>
</li>
</ul>
</header>
<div class="col-sm-8">
<h4 class="title">
<a href="https://avinal.space/posts/development/rst-guide.html">reStructuredText in GitHub</a>
</h4>
<div class="content">
reStructuredText syntax
</div>
</div>
</article>
<hr>
<article class="row teaser">
<header class="col-sm-4 text-muted">
<ul>
<li title="2021-02-02T21:47:00+05:30">
<i class="fas fa-clock"></i>
Tue 02 February 2021
</li>
<li>
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/development.html">development</a>
</li>
</ul>
</header>
<div class="col-sm-8">
<h4 class="title">
<a href="https://avinal.space/posts/development/wakatime-readme.html">How I implemented WakaTime embeddable Coding Graph GHA?</a>
</h4>
<div class="content">
f 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.
</div>
</div>
</article>
<hr>
<ul class="pagination">
<li class="page-item">
<span class="page-link">1 of 3</span>
</li>
<li class="page-item">
<a class="page-link" href="https://avinal.space/author/avinal2.html">
<span aria-hidden="true">&raquo;</span>
<span class="sr-only">Next</span>
</a>
</li>
</ul>
</div>
</div>
<footer class="footer star">
<div id='stars'></div>
<div id='stars2'></div>
<div id='stars3'></div>
<div class="container">
<div class="row">
<ul class="col-sm-6 list-inline">
<li class="list-inline-item"><a
href="https://avinal.space/archives.html">Archives</a></li>
<li class="list-inline-item"><a
href="https://avinal.space/categories.html">Categories</a></li>
<li class="list-inline-item"><a href="https://avinal.space/tags.html">Tags</a></li>
</ul>
<p class="col-sm-6 text-sm-right text-muted">Created with <i class="fa fa-heart" style="color: red;"></i> by <a
href="https://github.com/avinal" target="_blank">Avinal</a>
</p>
</div> </div>
</footer>
</body>
</html>
+220
View File
@@ -0,0 +1,220 @@
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Avinal Articles | Be My SpaceTime
</title>
<link rel="canonical" href="https://avinal.space/author/avinal2.html">
<link rel="apple-touch-icon" href="https://avinal.space/apple-touch-icon.png" sizes="180x180">
<link rel="icon" type="image/png" href="https://avinal.space/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://avinal.space/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://avinal.space/site.webmanifest">
<meta name="theme-color" content="#333333">
<link rel="stylesheet" href="https://avinal.space/theme/css/bootstrap.min.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/all.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/pygments/manni.min.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/theme.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/space.css">
<link rel="alternate" type="application/atom+xml" title="Full Atom Feed" href="https://avinal.space/feeds/all.atom.xml">
</head>
<body style="font-family:Overpass Mono,monospace;">
<header class="header star">
<div id='stars'></div>
<div id='stars2'></div>
<div id='stars3'></div>
<div class="container text-center">
<div class="row">
<div class="col-sm-12">
<h1 class="title" style="font-family: ExodarOut;font-weight: lighter;"><a href="https://avinal.space/">Be My SpaceTime</a>
</h1>
<!--
<p class="text-muted">눈치</p>
-->
<ul class="list-inline">
<li class="list-inline-item"><a href="https://gsoc.avinal.space" target="_blank">gsoc</a></li>
<li class="list-inline-item text-muted">|</li>
<li class="list-inline-item"><a href="https://avinal.space/pages/about-me.html">About Me</a></li>
<li class=" list-inline-item text-muted">|</li>
<li class="list-inline-item"><a class="fab fa-github" href="https://github.com/avinal" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-linkedin" href="https://www.linkedin.com/in/avinal/" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-instagram" href="https://instagram.com/avinal.k" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-calendar" href="https://meet.avinal.space" target="_blank"></a></li>
<li class="list-inline-item"><a class="fa fa-envelope" href="mailto:blog@avinal.space" target="_blank"></a></li>
</ul>
</div>
</div> </div>
</header>
<div class="main">
<div class="container">
<h1>Avinal Articles
</h1>
<hr>
<article class="row teaser">
<header class="col-sm-4 text-muted">
<ul>
<li title="2021-01-26T16:47:00+05:30">
<i class="fas fa-clock"></i>
Tue 26 January 2021
</li>
<li>
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/development.html">development</a>
</li>
</ul>
</header>
<div class="col-sm-8">
<h4 class="title">
<a href="https://avinal.space/posts/development/twilight-blog.html">How I Created This Blog?</a>
</h4>
<div class="content">
As you would have guessed by now, this blog is created using one such awesome SSG named Pelican. Pelican is simple, customizable and offers lots of themes and plugins. Pelican is python based SSG and is available through pip.
</div>
</div>
</article>
<hr>
<article class="row teaser">
<header class="col-sm-4 text-muted">
<ul>
<li title="2021-01-09T22:29:00+05:30">
<i class="fas fa-clock"></i>
Sat 09 January 2021
</li>
<li>
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/prime.html">prime</a>
</li>
</ul>
</header>
<div class="col-sm-8">
<h4 class="title">
<a href="https://avinal.space/posts/prime/prime1.html">Introduction to Prime Numbers</a>
</h4>
<div class="content">
A prime is a positive integer p having exactly two positive divisors, namely 1 and p. An integer n is composite if n > 1 and n is not prime. (The number 1 is considered neither prime nor composite.)
</div>
</div>
</article>
<hr>
<article class="row teaser">
<header class="col-sm-4 text-muted">
<ul>
<li title="2021-01-04T21:47:00+05:30">
<i class="fas fa-clock"></i>
Mon 04 January 2021
</li>
<li>
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/blog.html">blog</a>
</li>
</ul>
</header>
<div class="col-sm-8">
<h4 class="title">
<a href="https://avinal.space/posts/blog/hrt-interview-1.html"><abbr title="Hudson River Trading">HRT</abbr> Systems Internship Interview Experience</a>
</h4>
<div class="content">
I applied for Systems Internship - Summer 2021 back in December 2020 at Hudson River Trading , New York.....Questions were clear and of medium level. But they were designed in such a way that you must know the basics before you could attempt.
</div>
</div>
</article>
<hr>
<article class="row teaser">
<header class="col-sm-4 text-muted">
<ul>
<li title="2020-12-31T19:07:00+05:30">
<i class="fas fa-clock"></i>
Thu 31 December 2020
</li>
<li>
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/development.html">development</a>
</li>
</ul>
</header>
<div class="col-sm-8">
<h4 class="title">
<a href="https://avinal.space/posts/development/wsl1.html">Move WSL 2 Safely to another Drive</a>
</h4>
<div class="content">
It is real pain when you have small SSD and Windows Subsystem for Linux (WSL) is growing exponentially in size. There is no easy way to move the WSL installation to another drive. Here in this blog I will discuss how to tackle this problem with bite size steps.
</div>
</div>
</article>
<hr>
<article class="row teaser">
<header class="col-sm-4 text-muted">
<ul>
<li title="2020-12-01T23:47:00+05:30">
<i class="fas fa-clock"></i>
Tue 01 December 2020
</li>
<li>
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/development.html">development</a>
</li>
</ul>
</header>
<div class="col-sm-8">
<h4 class="title">
<a href="https://avinal.space/posts/development/vlc-gsod-report.html">Create the VLC User Documentation for one Mobile Port(Android)</a>
</h4>
<div class="content">
The project was to Create the VLC User Documentation for Android Mobile Port which was previously hosted on VLCs wiki pages. The major portion of this was to start everything from scratch including chapter separation, section organization.
</div>
</div>
</article>
<hr>
<ul class="pagination">
<li class="page-item">
<a class="page-link" href="https://avinal.space/author/avinal.html">
<span aria-hidden="true">&laquo;</span>
<span class="sr-only">Previous</span>
</a>
</li>
<li class="page-item">
<span class="page-link">2 of 3</span>
</li>
<li class="page-item">
<a class="page-link" href="https://avinal.space/author/avinal3.html">
<span aria-hidden="true">&raquo;</span>
<span class="sr-only">Next</span>
</a>
</li>
</ul>
</div>
</div>
<footer class="footer star">
<div id='stars'></div>
<div id='stars2'></div>
<div id='stars3'></div>
<div class="container">
<div class="row">
<ul class="col-sm-6 list-inline">
<li class="list-inline-item"><a
href="https://avinal.space/archives.html">Archives</a></li>
<li class="list-inline-item"><a
href="https://avinal.space/categories.html">Categories</a></li>
<li class="list-inline-item"><a href="https://avinal.space/tags.html">Tags</a></li>
</ul>
<p class="col-sm-6 text-sm-right text-muted">Created with <i class="fa fa-heart" style="color: red;"></i> by <a
href="https://github.com/avinal" target="_blank">Avinal</a>
</p>
</div> </div>
</footer>
</body>
</html>
+168
View File
@@ -0,0 +1,168 @@
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Avinal Articles | Be My SpaceTime
</title>
<link rel="canonical" href="https://avinal.space/author/avinal3.html">
<link rel="apple-touch-icon" href="https://avinal.space/apple-touch-icon.png" sizes="180x180">
<link rel="icon" type="image/png" href="https://avinal.space/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://avinal.space/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://avinal.space/site.webmanifest">
<meta name="theme-color" content="#333333">
<link rel="stylesheet" href="https://avinal.space/theme/css/bootstrap.min.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/all.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/pygments/manni.min.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/theme.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/space.css">
<link rel="alternate" type="application/atom+xml" title="Full Atom Feed" href="https://avinal.space/feeds/all.atom.xml">
</head>
<body style="font-family:Overpass Mono,monospace;">
<header class="header star">
<div id='stars'></div>
<div id='stars2'></div>
<div id='stars3'></div>
<div class="container text-center">
<div class="row">
<div class="col-sm-12">
<h1 class="title" style="font-family: ExodarOut;font-weight: lighter;"><a href="https://avinal.space/">Be My SpaceTime</a>
</h1>
<!--
<p class="text-muted">눈치</p>
-->
<ul class="list-inline">
<li class="list-inline-item"><a href="https://gsoc.avinal.space" target="_blank">gsoc</a></li>
<li class="list-inline-item text-muted">|</li>
<li class="list-inline-item"><a href="https://avinal.space/pages/about-me.html">About Me</a></li>
<li class=" list-inline-item text-muted">|</li>
<li class="list-inline-item"><a class="fab fa-github" href="https://github.com/avinal" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-linkedin" href="https://www.linkedin.com/in/avinal/" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-instagram" href="https://instagram.com/avinal.k" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-calendar" href="https://meet.avinal.space" target="_blank"></a></li>
<li class="list-inline-item"><a class="fa fa-envelope" href="mailto:blog@avinal.space" target="_blank"></a></li>
</ul>
</div>
</div> </div>
</header>
<div class="main">
<div class="container">
<h1>Avinal Articles
</h1>
<hr>
<article class="row teaser">
<header class="col-sm-4 text-muted">
<ul>
<li title="2020-09-28T22:47:00+05:30">
<i class="fas fa-clock"></i>
Mon 28 September 2020
</li>
<li>
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/blog.html">blog</a>
</li>
</ul>
</header>
<div class="col-sm-8">
<h4 class="title">
<a href="https://avinal.space/posts/blog/this-is-for-you.html">The Interstellar Twilight</a>
</h4>
<div class="content">
If in the Twilight of dreams we should meet once more, we shell talk again together and I shall sing to you a lullaby till you sleep again to meet me in the Twilight of another dream.
</div>
</div>
</article>
<hr>
<article class="row teaser">
<header class="col-sm-4 text-muted">
<ul>
<li title="2019-09-21T15:47:00+05:30">
<i class="fas fa-clock"></i>
Sat 21 September 2019
</li>
<li>
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/article.html">article</a>
</li>
</ul>
</header>
<div class="col-sm-8">
<h4 class="title">
<a href="https://avinal.space/posts/article/for-sunshine.html">प्रेम रतन धन पायो</a>
</h4>
<div class="content">
टूटता तारा देखना एक अलौकिक अनुभव है। हिमाद्रि के छत से आसमान कुछ ज्यादा ही करीब प्रतीत होता है । लोग सदियों से हिमालय को पूजते आयें हैं । दादा-दादी कहा करते थे ये जिंदा पहाड़ हैं । सारी बातें सुनते हैं लोगों की । उनके दुख दर्द दूर करते हैं, ये देवता हैं ।
</div>
</div>
</article>
<hr>
<article class="row teaser">
<header class="col-sm-4 text-muted">
<ul>
<li title="2012-02-27T22:47:00+05:30">
<i class="fas fa-clock"></i>
Mon 27 February 2012
</li>
<li>
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/article.html">article</a>
</li>
</ul>
</header>
<div class="col-sm-8">
<h4 class="title">
<a href="https://avinal.space/posts/article/red-big-ants.html">The Big Red Ants</a>
</h4>
<div class="content">
In a birds eye view if we see around us, ants are the common and tiniest living entitiy seen by naked eye. One of them are the big red ants, in my view they are unique from others in two ways, first they live on trees and second their anteenas are too long and bent in middle, seems like their fore legs. Their mandible (mouth) seems like eagles beak.
</div>
</div>
</article>
<hr>
<ul class="pagination">
<li class="page-item">
<a class="page-link" href="https://avinal.space/author/avinal2.html">
<span aria-hidden="true">&laquo;</span>
<span class="sr-only">Previous</span>
</a>
</li>
<li class="page-item">
<span class="page-link">3 of 3</span>
</li>
</ul>
</div>
</div>
<footer class="footer star">
<div id='stars'></div>
<div id='stars2'></div>
<div id='stars3'></div>
<div class="container">
<div class="row">
<ul class="col-sm-6 list-inline">
<li class="list-inline-item"><a
href="https://avinal.space/archives.html">Archives</a></li>
<li class="list-inline-item"><a
href="https://avinal.space/categories.html">Categories</a></li>
<li class="list-inline-item"><a href="https://avinal.space/tags.html">Tags</a></li>
</ul>
<p class="col-sm-6 text-sm-right text-muted">Created with <i class="fa fa-heart" style="color: red;"></i> by <a
href="https://github.com/avinal" target="_blank">Avinal</a>
</p>
</div> </div>
</footer>
</body>
</html>
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2023 Avinal Kumar
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-5
View File
@@ -1,5 +0,0 @@
+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++
File diff suppressed because it is too large Load Diff
-541
View File
@@ -1,541 +0,0 @@
/*
! tailwindcss v3.3.6 | MIT License | https://tailwindcss.com
*/
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
box-sizing: border-box;
/* 1 */
border-width: 0;
/* 2 */
border-style: solid;
/* 2 */
border-color: #e5e7eb;
/* 2 */
}
::before,
::after {
--tw-content: '';
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
*/
html {
line-height: 1.5;
/* 1 */
-webkit-text-size-adjust: 100%;
/* 2 */
-moz-tab-size: 4;
/* 3 */
-o-tab-size: 4;
tab-size: 4;
/* 3 */
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
/* 4 */
font-feature-settings: normal;
/* 5 */
font-variation-settings: normal;
/* 6 */
}
/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/
body {
margin: 0;
/* 1 */
line-height: inherit;
/* 2 */
}
/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/
hr {
height: 0;
/* 1 */
color: inherit;
/* 2 */
border-top-width: 1px;
/* 3 */
}
/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/
abbr:where([title]) {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
/*
Remove the default font size and weight for headings.
*/
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: inherit;
}
/*
Reset links to optimize for opt-in styling instead of opt-out.
*/
a {
color: inherit;
text-decoration: inherit;
}
/*
Add the correct font weight in Edge and Safari.
*/
b,
strong {
font-weight: bolder;
}
/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp,
pre {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
/* 1 */
font-feature-settings: normal;
/* 2 */
font-variation-settings: normal;
/* 3 */
font-size: 1em;
/* 4 */
}
/*
Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/
table {
text-indent: 0;
/* 1 */
border-color: inherit;
/* 2 */
border-collapse: collapse;
/* 3 */
}
/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
/* 1 */
font-feature-settings: inherit;
/* 1 */
font-variation-settings: inherit;
/* 1 */
font-size: 100%;
/* 1 */
font-weight: inherit;
/* 1 */
line-height: inherit;
/* 1 */
color: inherit;
/* 1 */
margin: 0;
/* 2 */
padding: 0;
/* 3 */
}
/*
Remove the inheritance of text transform in Edge and Firefox.
*/
button,
select {
text-transform: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/
button,
[type='button'],
[type='reset'],
[type='submit'] {
-webkit-appearance: button;
/* 1 */
background-color: transparent;
/* 2 */
background-image: none;
/* 2 */
}
/*
Use the modern Firefox focus style for all focusable elements.
*/
:-moz-focusring {
outline: auto;
}
/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/
:-moz-ui-invalid {
box-shadow: none;
}
/*
Add the correct vertical alignment in Chrome and Firefox.
*/
progress {
vertical-align: baseline;
}
/*
Correct the cursor style of increment and decrement buttons in Safari.
*/
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/
[type='search'] {
-webkit-appearance: textfield;
/* 1 */
outline-offset: -2px;
/* 2 */
}
/*
Remove the inner padding in Chrome and Safari on macOS.
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */
}
/*
Add the correct display in Chrome and Safari.
*/
summary {
display: list-item;
}
/*
Removes the default spacing and border for appropriate elements.
*/
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
margin: 0;
}
fieldset {
margin: 0;
padding: 0;
}
legend {
padding: 0;
}
ol,
ul,
menu {
list-style: none;
margin: 0;
padding: 0;
}
/*
Reset default styling for dialogs.
*/
dialog {
padding: 0;
}
/*
Prevent resizing textareas horizontally by default.
*/
textarea {
resize: vertical;
}
/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/
input::-moz-placeholder, textarea::-moz-placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
input::placeholder,
textarea::placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
/*
Set the default cursor for buttons.
*/
button,
[role="button"] {
cursor: pointer;
}
/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
cursor: default;
}
/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
This can trigger a poorly considered lint error in some tools but is included by design.
*/
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block;
/* 1 */
vertical-align: middle;
/* 2 */
}
/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/
img,
video {
max-width: 100%;
height: auto;
}
/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden] {
display: none;
}
*, ::before, ::after {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
--tw-skew-x: 0;
--tw-skew-y: 0;
--tw-scale-x: 1;
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-gradient-from-position: ;
--tw-gradient-via-position: ;
--tw-gradient-to-position: ;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgb(59 130 246 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-drop-shadow: ;
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
}
::backdrop {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
--tw-skew-x: 0;
--tw-skew-y: 0;
--tw-scale-x: 1;
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-gradient-from-position: ;
--tw-gradient-via-position: ;
--tw-gradient-to-position: ;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgb(59 130 246 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-drop-shadow: ;
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
}
-8
View File
@@ -1,8 +0,0 @@
window.remark_config = {
host: "https://remark42.avinal.space",
site_id: "remark",
show_rss_subscription: false,
theme: 'dark',
no_footer: true,
};
-5
View File
@@ -1,5 +0,0 @@
---
date: "2023-01-01T08:00:00-07:00"
draft: false
title: Home
---
-7
View File
@@ -1,7 +0,0 @@
---
date: "2023-01-01T08:30:00-07:00"
draft: false
title: Posts
---
All the posts.
@@ -1,60 +0,0 @@
---
category: article
date: 2012-02-27T22:47:00
description: The Big Red Ants
image: /images/ants.webp
tags:
- ants
- sav
title: The Big Red Ants
---
In a bird's eye view if we see around us, ants are the common and
tiniest living entitiy seen by naked eye. One of them are the big red
ants, in my view they are unique from others in two ways, first they
live on trees and second their anteenas are too long and bent in middle,
seems like their fore legs. Their mandible (mouth) seems like eagle's
beak.
As I observed them making and reparing their nests, I concluded that
they are very laborious and intellectual. They create their nests by
binding two or more leaves (maybe up to 500) together. They stich the
leaves using a stinky white substance either excreted by themselves or
from trees. This substance is like web of spider. At first builder ants
creates an array at the blade of two leaves. Then they make ant-cranes
or ant-chain like chain of monomer to form a polymer. They catch the
leaves and pull each other to stich. After some time, the parliament of
leaves transforms into a leaf-sac called their nest. They also weave
translucent cloth like structure to cover remainings of leaf. A nest
hangs by a branch of the trees.
A nest is skillfully divided into living rooms, barracks, storehouse,
egg room and queen's room. The eggroom, lies at the center of nest to
protect from outer attack until last time. Besides that, lies queen's
room. Living rooms are sequenncly joined with eggroom. There are
different rooms for workers, food searchers etc. The partition of the
room resembles atom's electron shell, one upon another. At last barracks
are the outermost rooms, just like outermost orbit of electron. The
defence system is strongest at the nest's opening. A nest may size as
2-3 footballs and have 50 to 10000 ants. There may be more openings.
Now about their attacking and protecting skills. A solider is unique
from other ants. It is equipped with many attacking and defending
skills. Normally they do not attack. They are social insects. If someone
attacks, all other ants go inside, and soldiers come out. They spread
allover the nest. They are very sensetive and have sharp vision. If any
one of them see their enemy the stand on their hind legs, swinging,
their forelegs and anteens in their air as scolding someone. Their spit
contains formic acid, present at the end of the abdomen below the
rectum. If their nest is broken and eggs fall on ground then the ants
make a dome, like the dome of Taj mahal to save the eggs till last their
breadth. This shows their caring skills.
The most amazing is their discipline. They can easily beat a human in
race of discipline. Humans must learn from it. When two ants meet, they
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:
@@ -1,166 +0,0 @@
---
category: article
date: 2024-11-30T23:47:00
description: Plant your lilies, and let them teach you how to grow.
image: /images/soul-lily.webp
tags:
- Lily
- Despair
- Patience
- Gardening
- Plant
- Heart
title: How to grow Lilies?
---
Lilies, they say, are symbols of peace. But peace is not given; it is cultivated. Lilies demand
effort, patience, and faith - a willingness to confront the barren soil and nurture it back to life.
What follows is a guide to growing Lilies and a journey into a soul's quiet reckoning with despair.
## What Once Was and Will be Again
The garden was barren, its silence oppressive. The earth, dry and unyielding, clung stubbornly to
its lifelessness as though it had forgotten how to nurture, how to hope. It stood as a monument to
neglect, an expanse of quiet despair that seemed to whisper, Nothing will ever grow here again.
And yet, something stirred - a faint whisper beneath the desolation, an inkling that even the most
forsaken soil might still hold secrets of renewal. It was not certainty but a quiet rebellion
against despair, a defiant act of belief. The decision to grow lilies was made not with confidence
but with trembling hands, as if planting these flowers might coax life back into the hollow spaces
of the heart.
## From Ashes, We Rise
To grow lilies, one must first break the earth. Not gently, but with purpose—plunging the spade into
the hardened crust, forcing it to yield. Each strike dislodges fragments of the past: shards of what
was once beautiful, tangled roots of pain buried so deep they have become part of the soil.
The work is relentless. The ground resists, clutching its dead weight as though afraid of what might
take its place. But with each motion, the soil begins to soften. The air fills with the earthy scent
of transformation, a quiet promise that the past does not have to dictate the future.
This is where the lilies begin—not with planting, but with clearing. The garden must first be
emptied of its grief to make room for something new. It is an act of defiance and of hope, to
believe that this barren soil can one day cradle life again.
## Between a Rock and a Lily
The bulbs are unremarkable, their appearance betraying nothing of what they might become. Holding
them feels strange, as if they are too fragile to survive. And yet, there is a quiet power within
them—a promise waiting to be fulfilled.
Planting them is an act of faith and surrender, a quiet conversation between the gardener and the
earth. Each bulb is placed with care, its position a deliberate choice. It is not enough to bury
them; they must be cradled, surrounded by soil that is ready to nurture them.
And then comes the waiting. Beneath the surface, where no eyes can see, the bulbs begin their secret
work. It is a reminder that growth often begins in the darkness, in spaces where no light reaches.
## Tend the Flame, Not the Ash
The lilies require consistency. The soil must be tended to every day, watered with steady hands.
Some days, the water feels heavy in your palms, as if the weight of the act might be too much to
bear. But you do it anyway, knowing that without this care, the lilies cannot thrive.
The sunlight is capricious. Some days, it floods the garden, bathing it in warmth. Other days, it
hides behind thick clouds, forcing the lilies to stretch toward a light they cannot see. But they
adapt. Lilies have a way of finding what they need, even in the absence of abundance.
This daily ritual of watering and watching is its own form of prayer. Each drop of water, each
fleeting moment of sunlight, whispers to the lilies: *Grow, even if it feels impossible. Grow, even
when no one is watching.*
## This Too Shall Bloom
One day, the soil breaks open - not with a flourish, but with the quietest of gestures. A tiny green
sprout emerges, barely noticeable, a sliver of life against the vastness of the earth.
To the untrained eye, it is nothing. To you, it is everything. This fragile sprout is proof that
something is happening beneath the surface, that your labor was not in vain. It is the first sign of
life returning, the first whisper of hope finding its voice.
But the sprout is not strong. It bends with the wind, threatened by the weight of even a single
raindrop. Your instinct may be to shield it, to protect it from every possible harm. But lilies do
not grow in safety. They grow in resilience.
![Glimpse of the Lilies](/images/growing-lilies.jpg)
## The Idea is Not to Abandon Ever...Never
The garden is never free from trials. Storms roll in, their winds threatening to uproot what little
has begun to grow. Pests arrive uninvited, gnawing at leaves and stems as though testing your
resolve. The sun beats down mercilessly one day, only to disappear for weeks on end.
It is in these moments that you are tempted to despair, to abandon the garden and declare it a
failure. But lilies teach you that resilience is not about avoiding hardship; it is about enduring
it. When the storm passes, you clear the debris. When pests arrive, you remove them. When the
drought stretches on, you water the soil with your own tears if you must.
Each act, no matter how small, is a promise to the lilies: *I will not abandon you*.
## Bloom Where None Thought Possible
And then, when you least expect it, the bloom arrives. It begins as a tightly closed bud, hesitant
to reveal itself. Slowly, it unfurls, each petal a story of quiet perseverance. The bloom is
breathtaking, not for its extravagance, but for its purity.
Its beauty is unlike anything you imagined. It is not extravagant or loud, but it holds a quiet
majesty. The petals, soft and delicate, seem to hum with a silent strength. This bloom is not just a
flower—it is the culmination of every act of care, every moment of faith, every drop of water given
when it felt like too much.
The bloom reminds you that peace is not a permanent state but a transient gift. It must be cherished
in its moment, for its impermanence is part of its beauty.
## The Most Dangerous Thing About Me
The most dangerous thing about me is that *I don't know how to give up*.
When the storms tore through, I stayed. When the roots clung to the earth like they had a right to
its emptiness, I dug deeper. Even when the soil screamed that nothing could ever grow here, I
refused to listen.
It's not resilience—it's defiance. A stubbornness that borders on recklessness. I don't know when to
stop, even when the odds mock me. Even when it hurts.
Maybe it's toxic. Maybe it's foolish. But here I am, hands in the dirt, refusing to abandon what
could still bloom.
## Faith Buried, Faith Unfurled
To grow lilies is to embark on a journey of transformation. It is not about the flowers themselves
but about what they symbolize—a return to life, a reclaiming of hope. The barren garden, once a
place of despair, becomes a sanctuary.
The lilies do not erase the struggles that came before them. The soil still bears the scars of its
past, and the storms will come again. But the garden is no longer defined by its emptiness. It is
defined by its capacity to grow.
And so the lilies teach you their final lesson: Growth is not a destination but a process. It is a
daily choice to clear the debris, plant the bulbs, and tend to the garden—even when it feels like
nothing is happening. It is a faith that, with time and care, the lilies will bloom again.
## This is not my Recipe
I didn't write this. Or maybe I did. But I don't remember planting these thoughts. They feel
foreign, like letters rearranged while I wasn't looking, like whispers heard through the hum of the
wind.
I think they've always been here, whispering just below the surface, tugging at my hands when I
wasn't looking. They know things about me that I haven't told anyone. Things I've hidden. Things
I've forgotten.
Do you feel it too? The hum beneath the words, the tremor that isn't mine? It's as if the garden
remembers something I don't. It isn't just soil. It's memory. It's pain. It's despair. It's rebirth.
I wrote this, but I didn't write this. These aren't my words. But they're mine now, whether I wanted
them or not.
## Meet my Lilies
And finally meet my most beautiful lilies. I have named them **Blood Demon Lily** and **Light Mode
Lily**.
![My Lilies](/images/my-lilies.jpg)
Plant your lilies, and let them teach you how to grow.
@@ -1,231 +0,0 @@
---
category: blogs
date: 2024-06-07T02:47:00
description: In January, I started switching to terminal-based tools and just
recently, I was able to use my terminal for most of my development work.
This blog highlights what tools I am using and for what purposes.
image: /images/dog-using-terminal.jpg
tags:
- terminal
- zellij
- neovim
- tmux
- zoxide
- lazygit
- fzf
- atuin
- alacritty
- starship
- toolbox
- toolbx
- gh
- zsh
- oh-my-zsh
- cli
- stow
title: "Echoes from the Shell: The Tools That Talk Back"
---
I started programming on a Windows machine about 6 years ago. I had just joined
college and had little clue about what tools to use and where to start. Slowly
I learnt new things and knowing more tools from friends, seniors, blogs and
YouTube. One thing was pretty common, almost everyone was recommending a Linux
based OS. I wasn't completely ready to switch, so I started using WSL2. WSL2
with Visual Studio Code were my daily driver for everything programming for
next 2.5 years.
## Linux loading
I got selected into Google Summer of Code in 2021 and the project I was
contributing to runs solely on Linux. So I finally left Windows and started
using Ubuntu. I was also a part of GLUG (GNU/Linux Users Group) in my college,
and that was one of the factors that motivated me to move. I used Ubuntu and
VS Code for next 1 year.
The next significant change to my setup came in 2022 January when I joined Red Hat
as an Intern. And the first task given to me was "Remove everything on your
ThinkPad and install Fedora". I used it for few months and then I switched to
Fedora on my personal laptop as well. After using Fedora for 2.5 years now, I
want to say Fedora is simply an excellent choice for students and developers
alike (until you intend to use Arch and burn the world).
## My current setup
![Glimpse into the terminal](/images/terminal-workspace.png)
*Note: Open the image in a new tab for better viewing.*
Currently, I am using Fedora 40 with Sway Window Manager and tons of terminal
based tools. Just to be clear, I am not a keyboard nerd, but it does get my
work done faster and non-intrusively. I use a mouse for a fair share of my work
(I own [Logitech MX Master 3s](https://avinal.space/posts/blogs/configuring-logitech-mouse-on-fedora/)).
I will now be explaining what tools I use and why I prefer them. You can
get additional information about them by simply an internet search as they are pretty
famous.
This is not a blog about replicating the exact setup. So I will omit the
obvious tools, i.e. ZSH, plugins etc. Rather, I will enlist the major tools.
I am going to divide my tools in few categories:
- Tools I use for development
- Enhancing Terminal capabilities
- Miscellaneous
## Tools I use for development
This will be a trivial section, there are thousands of articles and videos
on the internet that cover this topic. I am just going to add my two paise.
### Neovim
Well, I know. You are going to say "yeah, expected". But IIWII. I started using
Neovim as my primary development tool in January this year. It was a little hard
to get used to it, but once I got familiar it feels like a breeze. I switched
from VS Code because of how bloated it is getting. I do not want a superfast
editor with outstanding benchmarks and awesome features and customizability.
Those are secondary, but most of all, I don't like being distracted. With all the
new things getting into VS Code it felt like, just too many features than I
need. I totally love VS Code, it was my daily drive for 5 years but
I felt I needed something minimal, and minimal it is.
I did some hopping from one config to another in the last 5 months and finally, I
decided to configure it myself using kickstart repository and it works better
than ever. I am still learning how to get most out of it.
- [Neovim](https://neovim.io/)
- [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
- [Carbonfox from Nightfox.nvim theme](https://github.com/EdenEast/nightfox.nvim?tab=readme-ov-file#carbonfox)
- [My configuration](https://github.com/avinal/dotfiles/tree/main/.config/nvim)
### Lazygit
When I moved from VS Code to Neovim, the one thing I missed most was a GUI
git extension. Although I use git CLI for most of my VCS work, but having a
visual display is helpful, especially for browsing changes and going through
commit history. VS Code git extension is a great tool and lazygit almost
replaces that for me. It has exactly those features that I generally use.
Plus it is configurable, the default configuration is more than enough for
most including me.
- [Lazygit](https://github.com/jesseduffield/lazygit)
### GitHub CLI
Many people have mixed opinion about this tool. For me, it works best for
what I generally do. And no, it doesn't replace git for me, I treat it like
a snippet tool that does few things with minimal effort, which would otherwise
take multiple commands using git. Additionally, most of the development work
I do go to GitHub, so it helps with that as well.
I mostly use it to clone, gist, creating pull requests, navigating issues,
checking out pull request branches, creating new repositories, and sometimes
for getting workflow status/logs. I strongly recommend it if you are eager to do
more from your terminal.
- [GitHub CLI](https://cli.github.com/)
## Enhancing Terminal capabilities
This category is focused on supercharging the default terminal with advanced
capabilities like better prompt, multiplexing, configurable layouts, session
management etc.
### Alacritty
What is wrong with Gnome terminal? Nothing. It is fantastic and I still use it
for many tasks. When it comes to configuring your terminal and actually being
able to reuse your configuration across machines, alacritty simply stands out.
It has tons of configurations and I loved using it, so I switched to it.
- [Alacritty](https://alacritty.org/)
- [GitHub Monaspace Argon font](https://monaspace.githubnext.com/)
- [My configuration](https://github.com/avinal/dotfiles/blob/main/.config/alacritty/alacritty.toml)
### Zellij
This one is interesting and new. I started using tmux as most people do when
they want to increase the density of work in a single terminal. It works and
is configurable as well. But there are some shortcomings for tmux. It does not
let you save a layout and the session management is basic. If you restart, you
will probably lose your setup.
Zellij address these problems and includes many new features on top of it.
You can create a layout in advance and also define what commands should be run
on start. There is a native plugin system and you can write plugins in most
languages that compile to WebAssembly. The configuration is human-friendly
and you can have multiple configuration files.
Initially, most users face issues with zellij default key bindings because of
their conflicts with Neovim. I choose to use different leader keys for
different tools. Here is the setup I use after getting recommendation on Reddit.
- Neovim: Ctrl
- Sway WM: OS Key/Command/Win Key
- Zellij: Alt
I also heavily modified the default key bindings as I saw fit. The tool is in
active development with numerous features planned.
- [Zellij](https://zellij.dev/)
- [Zellij vs Tmux](https://github.com/zellij-org/zellij/discussions/1701#discussioncomment-3517152)
- [My configuration](https://github.com/avinal/dotfiles/tree/main/.config/zellij)
### Atuin
I have covered Atuin before in my [last post](https://avinal.space/posts/raspi/everything-on-my-pi/#atuin).
So this will be a brief mention here. Atuin helps you sync your command
history across machines and provides excellent filtering and retrieval. If you
need a backup of your command history, Atuin is a way to go.
- [Atuin](https://atuin.sh/)
- [My configuration](https://github.com/avinal/dotfiles/blob/main/.config/atuin/config.toml)
## Miscellaneous
This section focuses on the tools that aren't very common but they rather
are unique in their own way, and you can get extra superpowers.
### Toolbx
This is more like a virtual terminal environment where you can install tools and
packages without adding them to the host OS. For example, if you are testing
some software, or want to build a project but don't want to install in your
machine. Or even having multiple independent environment and multiple distros
to develop your projects. I find this tool very useful. If you have such use
cases, give it a try.
- [Toolbx](https://containertoolbx.org/)
### Fzf
fzf is a companion tool that provides you fuzzy finding capabilities for a lot of
common CLI tools. You can use it in a plethora of ways and the integration with
tools are countless. It also comes with an interactive interface. This is a tool
which I want to say, you will understand only when you use it.
- [fzf](https://junegunn.github.io/fzf/)
### zoxide
zoxide brands itself as a smarter cd command, and this is precisely what it does.
It remembers where you often go and helps you get there faster next time. It
uses an impressive algorithm internally to rank the suggestions based on your
use.
- [zoxide](https://github.com/ajeetdsouza/zoxide)
## Echos
Here is the list of all other tools and plugins I didn't discuss, but they
are a useful part of my daily work.
- [Zsh](https://www.zsh.org/)
- [Oh My Zsh](https://ohmyz.sh/)
- [Starship](https://starship.rs/)
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim)
- [mason.nvim](https://github.com/williamboman/mason.nvim)
- [lazy.nvim](https://github.com/folke/lazy.nvim)
- [GNU Stow](https://www.gnu.org/software/stow/)
Please leave a comment, if you like reading this blog, or it helped you find a
good tool.
@@ -1,406 +0,0 @@
---
title: Configure Logitech MX Master 3S using LogiOps
date: 2023-09-25T20:47:00
category: blogs
tags: [fedora, mouse, "logid", "logitech", "logiops", "mx-master-3s"]
image: "/images/mouse-building.webp"
description: "I brought Logitech MX Master 3S mouse and it is a great mouse. It
has a lot of features and I am still exploring them. One of the features is to
configure the mouse using LogiOps. LogiOps is a command line tool to configure
Logitech devices on Linux distos."
---
I brought Logitech MX Master 3S mouse, and it is a great mouse. It has a lot of
features, and I am still exploring them. One of the features is to configure the
mouse using LogiOps. LogiOps is a command line tool to configure Logitech
devices on Linux distros, since Logitech provides official tools to configure the
mouse on Windows and macOS.
## Logitech MX Master 3S
Although I use keyboard shortcuts for most of my work, I still use the mouse a
lot. It is usually very helpful to have a good mouse, especially when you have
to scroll thousands of lines of code and documentation. This mouse features a
superfast scroll wheel that can scroll thousands of lines in a second. In total
there are 7 buttons on the mouse. The mouse can be connected to the computer via
Bluetooth or a USB receiver. It can also be connected to multiple devices at the
same time and can be switched between them using a button on the bottom of the
mouse. The mouse can be charged using a USB-C cable, and it can be used while
charging as well. You can see a 3D model of the mouse below. You can rotate the model using your
mouse or touchpad.
<iframe class="aspect-video w-full" title="Logitech MX Master 3 Mouse Black" frameborder="0" allowfullscreen
mozallowfullscreen="true" webkitallowfullscreen="true" allow="autoplay; fullscreen; xr-spatial-tracking"
xr-spatial-tracking execution-while-out-of-viewport execution-while-not-rendered web-share
src="https://sketchfab.com/models/c15eda7cd7874423a8c31d55193b9ff2/embed?ui_theme=dark&dnt=1"> </iframe>
The best part about this mouse is that it is very comfortable to use and highly
customizable. You can customize most of the buttons and even extend the functionality
by adding gestures. You can also customize the scroll wheel and the scroll
direction as well as the DPI and the pointer speed. All this can be done using
LogiOps.
## Installing LogiOps
It is an open source tool with code available on [GitHub](https://github.com/PixlOne/logiops).
This blog post will show you how to install and configure LogiOps on Fedora. The
steps should be similar for other Linux distros and other Logitech mice as well.
You can directly install using `dnf` but for latest version, you can build from
source.
- Install the dependencies.
```bash
sudo dnf install cmake libevdev-devel systemd-devel libconfig-devel gcc-c++ glib2-devel
```
- Clone the repository.
```bash
git clone https://github.com/PixlOne/logiops.git
```
- Build and install.
```bash
cd logiops
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
```
## Configuring LogiOps
In this blog post I will show you what buttons are available and how you can configure
actions (*keypress* or *gestures*) on them. Let us take a look at all the available buttons.
![Logitech MX Master 3S Buttons](/images/mx-master-3s-buttons.webp)
You can also get a table of available buttons, their CID and available features
by running logid in debug mode.
```bash
sudo logid -d
```
You can get output like this:
```bash
[INFO] Device found: MX Master 3S on /dev/hidraw4:255
[DEBUG] /dev/hidraw4:255 remappable buttons:
[DEBUG] CID | reprog? | fn key? | mouse key? | gesture support?
[DEBUG] 0x50 | | | YES |
[DEBUG] 0x51 | | | YES |
[DEBUG] 0x52 | YES | | YES | YES
[DEBUG] 0x53 | YES | | YES | YES
[DEBUG] 0x56 | YES | | YES | YES
[DEBUG] 0xc3 | YES | | YES | YES
[DEBUG] 0xc4 | YES | | YES | YES
[DEBUG] 0xd7 | YES | | | YES
[DEBUG] Thumb wheel detected (0x2150), capabilities:
[DEBUG] timestamp | touch | proximity | single tap
[DEBUG] YES | YES | YES | YES
[DEBUG] Thumb wheel resolution: native (18), diverted (120)
```
You can see thumb wheel has some cool features like touch, proximity and single
tap. Furthermore, you can configure these features in the configuration file. You can also
configure the thumb wheel resolution.
### Create a configuration file
LogiOps uses a configuration file to configure the mouse. By default, the
configuration file is located at `/etc/logid.cfg`. If you cannot
find the file, you can create one. You can copy the default configuration file
and edit it. You can find the default configuration file
[here](https://github.com/PixlOne/logiops/blob/main/logid.example.cfg). You can
read the documentation for the configuration file in [this wiki](https://github.com/PixlOne/logiops/wiki/Configuration).
```bash
sudo touch /etc/logid.cfg
```
You can also pass a custom path for the configuration file using `-c` flag. But
it never worked for me, so I am going to skip this part.
### Understanding the configuration options
You can obviously read the documentation for the configuration file, but I will
focus on easy understanding of the options that will be more than enough for most
users. I will be building the configuration file step by step and finally show
you the complete configuration file.
- Add a device and define its name
```cpp
devices: (
{
name: "MX Master 3S";
}
)
```
- Configure smartshift
```cpp
smartshift:
{
on: true;
threshold: 30;
torque: 50;
}
```
- Configure hires scrolling
```cpp
hiresscroll:
{
hires: true;
invert: false;
target: false;
}
```
- Configure dpi
```cpp
dpi: 2000;
```
Next we will see how to configure the buttons.
#### Buttons
Every button has a CID. You can see the CID of the buttons in the debug output
as well as in the image above. Every remappable button has some actions that can
be configured. You can configure a keypress or a gesture or a combination of
both.
There can be two situations when you configure a button. Either you want to
configure the button for a specific keypress, or you want to configure the button
for a specific gesture. You can also configure the button for both keypress and
gesture. In this case, the keypress will be triggered when you press the button
and the gesture will be triggered when you press the button and move the mouse
in a specific direction. The buttons can also be configured to toggle specific
fetcures of the mouse like smartshift, hires scrolling, etc.
First create a button section for the button you want to configure.
```cpp
buttons: (
{
<first-button>
},
{
<second-button>
}
)
```
- Configure only a keypress, let's configure the wheel button to take screenshot
```cpp
{
cid: 0x52;
action =
{
type: "keypress";
keys: ["KEY_PRINT"]
};
}
```
- Configure the top button to toggle SmartShift
```cpp
{
cid: 0xc4;
action =
{
type: "ToggleSmartShift";
}
}
```
- configure the gesture button for the following (sway based gestures)
- keypress: Opens Terminal
- Up gesture: Snaps current window to top
- Down gesture: Snaps current window to bottom
- Left gesture: Snaps current window to left
- Right gesture: Snaps current window to right
```cpp
{
cid: 0xc3;
action =
{
type: "Gestures";
gestures: (
{
direction: "Up";
mode: "OnRelease";
action =
{
type: "Keypress";
keys: ["KEY_LEFTMETA", "KEY_LEFTSHIFT", "KEY_UP"];
};
},
{
direction: "Down";
mode: "OnRelease";
action =
{
type: "Keypress";
keys: ["KEY_LEFTMETA", "KEY_LEFTSHIFT", "KEY_DOWN"];
};
},
{
direction: "Left";
mode: "OnRelease";
action =
{
type: "Keypress";
keys: ["KEY_LEFTMETA", "KEY_LEFTSHIFT", "KEY_LEFT"];
};
},
{
direction: "Right";
mode: "OnRelease";
action =
{
type: "Keypress";
keys = ["KEY_LEFTMETA", "KEY_LEFTSHIFT", "KEY_RIGHT"];
}
},
{
direction: "None"
mode: "OnRelease";
action =
{
type: "Keypress";
keys: ["KEY_LEFTMETA", "KEY_ENTER"];
}
}
);
};
}
```
The keypress while using with gestures is defined as direction **None**. These are
just some examples, you can go through the documentation to see all the available
options.
### Complete configuration file
Here is the complete configuration file that I use.
```cpp
devices: (
{
name: "MX Master 3S";
smartshift:
{
on: true;
threshold: 30;
torque: 50;
};
hiresscroll:
{
hires: true;
invert: false;
target: false;
};
dpi: 2000;
buttons: (
{
cid: 0xc3;
action =
{
type: "Gestures";
gestures: (
{
direction: "Up";
mode: "OnRelease";
action =
{
type: "Keypress";
keys: ["KEY_LEFTMETA", "KEY_LEFTSHIFT", "KEY_UP"];
};
},
{
direction: "Down";
mode: "OnRelease";
action =
{
type: "Keypress";
keys: ["KEY_LEFTMETA", "KEY_LEFTSHIFT", "KEY_DOWN"];
};
},
{
direction: "Left";
mode: "OnRelease";
action =
{
type: "Keypress";
keys: ["KEY_LEFTMETA", "KEY_LEFTSHIFT", "KEY_LEFT"];
};
},
{
direction: "Right";
mode: "OnRelease";
action =
{
type: "Keypress";
keys = ["KEY_LEFTMETA", "KEY_LEFTSHIFT", "KEY_RIGHT"];
}
},
{
direction: "None"
mode: "OnRelease";
action =
{
type: "Keypress";
keys: ["KEY_LEFTMETA", "KEY_ENTER"];
}
}
);
};
},
{
cid: 0x52;
action =
{
type: "Keypress";
keys: ["KEY_RIGHTCTRL", "KEY_PRINT"]
};
},
{
cid: 0xc4;
action =
{
type: "ToggleSmartshift";
};
}
);
}
);
```
## Post Configuration
Once configured you will need to restart the logid service.
```bash
sudo systemctl restart logid
```
Voila! You have successfully configured your Logitech mouse.
## References
- [LogiOps](https://github.com/PixlOne/logiops)
- [My Configurations](https://gist.github.com/avinal/2acfc0ac2952f4354dd3b4b78b8ccb2b)
-37
View File
@@ -1,37 +0,0 @@
---
title: Installing Fedora with automatic and custom partioning
date: 2023-01-19 23:02
category: blog
tags: [fedora, partioning]
image: ""
draft: true
---
Fedora is one of the most popular Linux distribution for daily uses as well as
development purpose. I have been a Linux user since 2019 and switched through
multiple distros since then. For a long time I was stuck with Ubuntu and now
finally Fedora. Fedora is an amazing distribution. You get to enjoy the latest
of almost everything. But this all starts with installing Fedora on your system.
Although Fedora is one of the most easy-to-install distribution out there, a lot
of people struggle to install it the right way. There is a lot of tutorials and
blogs as well, but I couldn't find one that answers all my questions and still is
easy to understand and follow along. So I decided to write one.
## What is the best for me?
## Complete automatic installation
## Semi-automatic custom partitioning
## Advanced custom partitioning
### Partition Scheme
| Mount Points | Filesystem | Size (minimum) | Remarks |
| --- | --- | --- | --- |
| `/boot/efi` | EFI | | |
| `/boot` | ext4 | | |
| `/` | ext4 | | |
| `/home` | btrfs | | |
## References
@@ -1,301 +0,0 @@
---
category: blogs
date: 2023-07-19T18:08:00
description: In the last post, I described how to install Tekton Results on a Kubernetes
cluster. In this post, we will see how to use Tekton Results to store the results
of a PipelineRun and how to retrive them later.
image: /images/tekton-results-retrieve.webp
tags:
- tekton
- kubernetes
- redhat
- openshift
- results
title: Tekton Results - Storing and Retrieving Results
---
In the [last post](/posts/blogs/hey-tekton-results/), I described how to install
Tekton Results on a Kubernetes cluster. In this post, we will see how to use Tekton
Results to store the results of a PipelineRun and how to retrive them later.
## Creating a PipelineRun/TaskRun
Let us create a simple PipelineRun to see how Tekton Results works. Here is a simple
PipelineRun that I created for this demo.
- Create a PipelineRun YAML file.
```sh
cat <<EOF > demo-pipeline-run.yaml
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: demo-pipeline-run
spec:
pipelineRef:
name: demo-pipeline
tasks:
- name: demo-task
taskSpec:
steps:
- name: demo-step
image: alpine
script: |
echo "Hello World"
EOF
```
- Create the PipelineRun.
```bash
kubectl apply --filename demo-pipeline-run.yaml
```
## Querying the Results API
There are three ways to query the Results API. The simplest way is to use
`tkn-results` CLI. You can also use `curl` or any other HTTP client as well as
a gRPC client. I will go through all three methods. Before we start, we have to
create a ServiceAccount and a ClusterRoleBinding to access the API.
- Create a ServiceAccount for quering the API.
```bash
kubectl create sa tekton-results-query -n tekton-pipelines
```
- Grant readonly permissions to the ServiceAccount
```bash
kubectl create clusterrolebinding tekton-results-query \
--clusterrole=tekton-results-readonly
--serviceaccount=tekton-pipelines:tekton-results-query
```
- Create an access token
```bash
export ACCESS_TOKEN=$(kubectl create token tekton-results-query -n tekton-pipelines)
```
- Expose the results API server, this will block so run in a separate shell.
```bash
kubectl port-forward --namespace tekton-pipelines \
service/tekton-results-api-service 8080:8080
```
### Using `tkn-results` CLI
We are not releasing the CLI yet, but you can install it using Go. You will need
[Go](https://golang.org/doc/install) installed on your machine.
- Install `tkn-results`
```bash
GOBIN=${TKN_PLUGINS_DIR:-"${HOME}/.config/tkn/plugins"} \
go install github.com/tektoncd/results/tools/tkn-results@latest
```
- Query the API, pass `--insecure` flag if you are using a self-signed certificate. In place of `default` you can pass the namespace name. `-` means all namespaces.
```bash
tkn-results list --insecure \
--addr http://localhost:8080
--authtoken $ACCESS_TOKEN
default
```
You will get a response like below.
```bash
Name Start Update
default/results/dcb7926e-42e8-4338-ab7d-0b67e02389be 2023-06-13 12:04:49 +0530 IST 2023-06-13 12:09:07 +0530 IST
```
- Similarly you can query Records for a particular PipelineRun or TaskRun Result.
```bash
tkn-results records list --insecure \
--addr http://localhost:8080
--authtoken $ACCESS_TOKEN
default/results/dcb7926e-42e8-4338-ab7d-0b67e02389be
```
You will get a response like below. Notice that there are two records, one for the PipelineRun and one for the TaskRun.
```bash
Name Type Start Update
default/results/dcb7926e-42e8-4338-ab7d-0b67e02389be/records/dcb7926e-42e8-4338-ab7d-0b67e02389be tekton.dev/v1beta1.PipelineRun 2023-06-13 12:04:51 +0530 IST 2023-06-13 12:19:09 +0530 IST
default/results/dcb7926e-42e8-4338-ab7d-0b67e02389be/records/64a0ab6e-9b90-4e5e-a072-e44d8ff27467 tekton.dev/v1beta1.TaskRun 2023-06-13 12:06:14 +0530 IST 2023-06-13 12:07:52 +0530 IST
```
- Finally you can get a single record too.
```bash
tkn-results records list --insecure \
--addr http://localhost:8080
--authtoken $ACCESS_TOKEN
default/results/dcb7926e-42e8-4338-ab7d-0b67e02389be/records/dcb7926e-42e8-4338-ab7d-0b67e02389be
```
You will get a response like below.
```json
{
"name": "default/results/dcb7926e-42e8-4338-ab7d-0b67e02389be/records/dcb7926e-42e8-4338-ab7d-0b67e02389be",
"id": "50b13d54-2eb0-4a45-8399-853f2d4ba028",
"uid": "50b13d54-2eb0-4a45-8399-853f2d4ba028",
"data": {
"type": "tekton.dev/v1beta1.PipelineRun",
"value": "eyJraW5kIjogIlBpcGVsaW5lUn<base64-encode-data-truncated-for-brevity>"
},
"etag": "50b13d54-2eb0-4a45-8399-853f2d4ba028-1686638949162394019",
"createdTime": "2023-06-13T06:34:51.320028Z",
"createTime": "2023-06-13T06:34:51.320028Z",
"updatedTime": "2023-06-13T06:49:09.162394Z",
"updateTime": "2023-06-13T06:49:09.162394Z"
}
```
### Using `curl`
Using curl is similar to using `tkn-results` CLI. You can use the same access
token and the same API server address. The only difference is that you have to
pass the access token as a header and provide the API path depending on what
you want to query.
- Query the results
```bash
curl --insecure \
-H "Authorization: Bearer $ACCESS_TOKEN"
-H "Accept: application/json"
https://localhost:8080/apis/results.tekton.dev/v1alpha2/parents/default/results
```
You will get a response like below.
```json
{
"results": [
{
"name": "default/results/dcb7926e-42e8-4338-ab7d-0b67e02389be",
"id": "50b13d54-2eb0-4a45-8399-853f2d4ba028",
"uid": "50b13d54-2eb0-4a45-8399-853f2d4ba028",
"createdTime": "2023-03-02T07:26:48.972907Z",
"createTime": "2023-03-02T07:26:48.972907Z",
"updatedTime": "2023-03-02T07:26:54.191114Z",
"updateTime": "2023-03-02T07:26:54.191114Z",
"annotations": {},
"etag": "50b13d54-2eb0-4a45-8399-853f2d4ba028-1677742014191114634",
"summary": {
"record": "default/results/dcb7926e-42e8-4338-ab7d-0b67e02389be/records/dcb7926e-42e8-4338-ab7d-0b67e02389be",
"type": "tekton.dev/v1beta1.PipelineRun",
"startTime": null,
"endTime": "2023-03-02T07:26:54Z",
"status": "SUCCESS",
"annotations": {}
}
}
],
"nextPageToken": ""
}
```
You can also use filters to query record for a particular (set of) PipelineRun
or TaskRun. See the available filters [here](https://github.com/tektoncd/results/blob/main/docs/api/README.md#filtering).
### Using gRPC
You can also use gRPC to query the API. You can use the same access token. You
will need to [install](https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md)
`grpc_cli` to query the API.
- Querying using gRPC will need cert. Here is how to export them.
```bash
kubectl get secrets tekton-results-tls -n tekton-pipelines \
--template='{{index .data "tls.crt"}}' | base64 -d > /tmp/results.crt
export GRPC_DEFAULT_SSL_ROOTS_FILE_PATH=/tmp/results.crt
```
- List available services
```bash
grpc_cli ls --channel_creds_type=ssl \
--ssl_target=tekton-results-api-service.tekton-pipelines.svc.cluster.local \
localhost:8080
```
You will get a response like below.
```bash
grpc.health.v1.Health
grpc.reflection.v1alpha.ServerReflection
tekton.results.v1alpha2.Results
```
- List the Results
```bash
grpc_cli call --channel_creds_type=ssl \
--ssl_target=tekton-results-api-service.tekton-pipelines.svc.cluster.local \
--call_creds=access_token=$ACCESS_TOKEN
localhost:8080
tekton.results.v1alpha2.Results.ListResults 'parent: "default"'
```
You will get a response like below.
```bash
connecting to localhost:8080
results {
name: "default/results/7afa9067-5001-4d93-b715-49854a770412"
id: "b74a3317-e6c0-421c-85d9-54b0f3d4b4c6"
created_time {
seconds: 1677742028
nanos: 143729000
}
etag: "b74a3317-e6c0-421c-85d9-54b0f3d4b4c6-1677742039224211588"
updated_time {
seconds: 1677742039
nanos: 224211000
}
uid: "b74a3317-e6c0-421c-85d9-54b0f3d4b4c6"
create_time {
seconds: 1677742028
nanos: 143729000
}
update_time {
seconds: 1677742039
nanos: 224211000
}
summary {
record: "default/results/7afa9067-5001-4d93-b715-49854a770412/records/7afa9067-5001-4d93-b715-49854a770412"
type: "tekton.dev/v1beta1.TaskRun"
end_time {
seconds: 1677742039
}
status: SUCCESS
}
}
```
Similar to curl you can pass filters here as well.
## Conclusion
In this post, we saw how to use Tekton Results to store the results of a PipelineRun
or TaskRun and how to query them later. Tekton Results is still in alpha, we are
working on adding more features to it. If you have any feedback or feature request,
please feel free to open an issue [here](https://github.com/tektoncd/results/issues)
or reach out to us on [Slack](https://tektoncd.slack.com/). Thanks for reading!
## References
- [Tekton Results](https://github.com/tektoncd/results)
- [Tekton Pipelines](https://github.com/tektoncd/pipeline)
- [Tekton Results API Specification](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/tektoncd/results/v0.7.0/docs/api/openapi.yaml)
- [Tekton Results CLI](https://github.com/tektoncd/results/tree/main/tools/tkn-results)
-280
View File
@@ -1,280 +0,0 @@
---
category: development
date: 2020-12-01T23:47:00
description: The project was to Create the VLC User Documentation for Android Mobile
Port which was previously hosted on VLC wiki pages. The major portion of this was
to start everything from scratch including chapter separation, section organization.
image: /images/day-of-cone.webp
modified: 2020-12-31 23:19
tags:
- vlc
- gsod
- gsod2020
title: Create the VLC User Documentation for one Mobile Port(Android)
---
VideoLAN is a non-profit organization that develops software for playing
video and other media formats. VLC media player (commonly known as just
VLC) is a free and Open Source cross-platform multimedia player and
framework that plays most multimedia files as well as DVDs, Audio CDs,
VCDs, and various streaming protocols built by the VideoLAN organization
and a team of volunteers. VLC for Android is a port of the VLC for
Android OS.
The project was to Create the VLC User Documentation for Android Mobile
Port which was previously hosted on VLC's wiki pages. The major portion
of this was to start everything from scratch including chapter
separation, section organization and an engaging and easy to follow for
both technical and non-technical users. The original proposal can be
found here.
## PROJECT GOALS
- Propose a new structure for documentation e.g. Chapter Separation,
Sections etc
- Proper balance between technical and non-technical descriptions to
serve all kinds of users.
- Adequate amount of screenshots in each section and other supporting
media to make documentation more appealing.
- Optimized for all Screen Sizes. Especially for Mobile Devices.
- Ease of navigation
## COMMUNITY BONDING
This period was mostly utilized for collecting more information and many
internal meetings to shape the projects and bonding with fellow writers,
developers(mentors). I got to know more about the VLC organization and
the project. We decided to create a skeleton of the project and then
follow a Issue-Merge Request-Review-Merge system to keep the commit
history clean and maintain the proper review of the work before it is
merged.
I initially proposed that the new documentation should also use the same
tools(Sphinx and GitLab Pages) because if in future we want to merge all
the documentation into a single one, it will be easier to migrate and
will provide a consistency across all documentations. Later I got to
know that this will be an independent project and may not be merged
since it solves a lot of problems. I was already familiar with the tools
so it took no time to get started.
Nicolas Pomepuy, who is the lead developer of VLC for Android was
assigned as my primary mentor and Simon Latapie as secondary mentor.
## DOCUMENTATION DEVELOPMENT PHASE
Initial Preparation I first moved my existing demo documentation to an
entirely new repository with only the skeleton at the suggestion of my
mentor. It was necessary to keep the commit history clean. The skeleton
contained the empty directories representing the chapter separation. I
got to learn “how to properly develop a project and contribute to open
source”. This was a major lesson that got me familiar with the Merge
Request and Review system.
The Development The next part was to frame the actual documentation
pages and push to the repository. Since there was a significant
time-zone difference we agreed to discuss by creating issues and
sometimes my emails. There was one meeting every fortnight to check the
process and discuss further development and blockers. Nicolas was really
helpful and patient, answering each of my big-small queries.
Work Done
<style>
table,td,th {
border-collapse:collapse;
border: 1px solid #000000;
}
</style>
<table>
<tr>
<td><strong>Documentation</strong></td>
<td><a href="https://avinal.videolan.me/vlc-android-user/">VLC for Android User Documentation </a>
</td>
</tr>
<tr>
<td><strong>Project Repository</strong>
</td>
<td><a href="https://code.videolan.org/avinal/vlc-android-user">Projects · Avinal Kumar / VLC for Android User Documentation</a>
</td>
</tr>
<tr>
<td><strong>Commits</strong>
</td>
<td><a href="https://code.videolan.org/avinal/vlc-android-user/-/commits/master">Commits · Avinal Kumar / VLC for Android User Documentation</a>
</td>
</tr>
<tr>
<td><strong>Issues/Discussions</strong>
</td>
<td><a href="https://code.videolan.org/avinal/vlc-android-user/-/issues">Issues · Avinal Kumar / VLC for Android User Documentation</a>
</td>
</tr>
<tr>
<td><strong>Merge Requests</strong>
</td>
<td><a href="https://code.videolan.org/avinal/vlc-android-user/-/merge_requests">Merge Requests · Avinal Kumar / VLC for Android User Documentation</a>
</td>
</tr>
</table>
Since the Android port of VLC can be installed on Android
Smartphones/Tablets, Android TVs, Amazon Fire Devices and Chromebooks
too, a full documentation will cover these all devices. Although these
are different form factors, the features provided on each of them is
exactly the same and the same documentation can be used for all these
devices. As of now only Smartphones/Tablets are covered. And later
additional pages will be added to reference different features/User
Interface. Regardless of this addition the current documentation can
serve a major part for all these form factors. Completed/Remaining
<table>
<tr>
<td><strong>Chapters</strong>
</td>
<td><strong>Sections</strong>
</td>
<td><strong>Status</strong>
</td>
</tr>
<tr>
<td><strong>Settings</strong>
</td>
<td>
<ul>
<li>General Settings
<li>Interface
<li>Video
<li>Subtitles
<li>Audio
<li>Casting
<li>Advanced
</li>
</ul>
</td>
<td><strong>ALL COMPLETED</strong>
<p>
<strong>FOR ALL FORM FACTORS</strong>
</td>
</tr>
<tr>
<td><strong>Video</strong>
</td>
<td>
<ul>
<li>Video Explorer
<li>Video Player
</li>
</ul>
</td>
<td><strong>COMPLETED FOR SMARTPHONES/TABLETS</strong>
</td>
</tr>
<tr>
<td><strong>Audio</strong>
</td>
<td>
<ul>
<li>Audio Explorer
<li>Audio Player
</li>
</ul>
</td>
<td><strong>COMPLETED FOR SMARTPHONES/TABLETS</strong>
</td>
</tr>
<tr>
<td><strong>Browse</strong>
</td>
<td>
<ul>
<li>Explorer
<li>Local Network
</li>
</ul>
</td>
<td><strong>ONLY SMB IN LOCAL NETWORK COMPLETED</strong>
</td>
</tr>
<tr>
<td><strong>Installation</strong>
</td>
<td>
<ul>
<li>Smartphones/Tablets
<li>Android TV
<li>Fire Devices
<li>Chromebooks
</li>
</ul>
</td>
<td><strong>COMPLETED FOR SMARTPHONES/TABLETS</strong>
</td>
</tr>
<tr>
<td><strong>User Interface</strong>
</td>
<td>
<ul>
<li>Smartphones/Tablets
<li>Android TV
<li>Fire Devices
<li>Chromebooks
</li>
</ul>
</td>
<td><strong>COMPLETED FOR SMARTPHONES/TABLETS</strong>
</td>
</tr>
<tr>
<td><strong>Support</strong>
</td>
<td>
<ul>
<li>FAQs
<li>Help
</li>
</ul>
</td>
<td><strong>IN PROGRESS</strong>
</td>
</tr>
<tr>
<td><strong>Guidelines</strong>
</td>
<td>
<ul>
<li>Contribution Guideline
<li>Screenshot Guidelines
<li>READMEs
</li>
</ul>
</td>
<td><strong>IN PROGRESS</strong>
</td>
</tr>
</table>
## CHALLENGES
The major obstacle was to get screenshots for all form factors. Since
screenshots were the major part of this documentation it was necessary
to provide proper screenshots in each chapter and with every step. For
Android TV and Smartphone this was solved by using emulators instead of
actual devices, but to emulate the actual scenario in an emulator was
sometimes very difficult. There were many occasions where I was not able
to gather the exact information about devices other than
smartphones/tables. Since all form factors share a common pool of
features, my mentor suggested that I focus on smartphones/tables. And to
create issues mentioning missing parts so that it could be solved later.
## THANKS
I want to thank my mentors for being supporting and helpful. I want to
thank every person at VLC and Google who were involved in this whole
process. Thanks and Congrats to my fellow writer Abhishek Pratap Singh.
This was a great opportunity to learn and meet awesome people. I learned
a lot about Sphinx, reStructured Text and many other things.
## ATTRIBUTION
- [Image by Tom Bigelajzen](https://images.videolan.org/images/goodies/day-of-the-cones-ex2.jpg)
@@ -1,172 +0,0 @@
---
category: blogs
date: 2023-03-16T20:47:00
description: Tekton Results aims to help users logically group CI/CD workload history
and separate out long term result storage away from the Pipeline controller.
image: /images/tekton-results-wall.webp
tags:
- tekton
- kubernetes
- redhat
- openshift
- results
title: Tekton Results to the Rescue
---
What do you do with your Tekton Pipelines once it finishes? Depending on if it
failed or passed, you may keep it to inspect the logs. For most of the users/organizations
the simplest step is to keep the completed TaskRuns/PipelineRuns object on the
cluster to retrieve the data later.
Imagine having thousands of runs and although a single TaskRun object takes very
small space compared to the scale of a production cluster, but these little
things add up quickly, and soon your cluster will be burdened with objects that
probably no one will ever revisit. The organization/user is keeping them
just-in-case if they want to see the logs and other data later.
Although in most of the cases there is a pruning policy that takes care of these
objects. But there are multiple problems with this approach.
- This type of storage is not reliable and very difficult to query.
- If the scale is massive, this could lead to destabilization of the cluster.
- If you have a pruning policy, the completed objects are cleaned, and you lose all the associated data as well.
So, what is the solution, how can you save your pipelines' data without having to keep them on cluster?
## Introducing Tekton Results
As mentioned on the [project repository](https://github.com/tektoncd/results):
> Tekton Results aims to help users logically group CI/CD workload history and
> separate out long term result storage away from the Pipeline controller. This
> allows you to:
>
> - Provide custom Result metadata about your CI/CD workflows not available in
> the Tekton TaskRun/PipelineRun CRDs (for example: post-run actions)
> - Group related workloads together (e.g. bundle related TaskRuns and PipelineRuns into a single unit)
> - Make long-term result history independent of the Pipeline CRD controller,
> letting you free up etcd resources for Run execution.
In short, Tekton results archives the run data (called results) and logs to an
external storage. Now you can safely prune completed TaskRuns/PipelineRuns and
save run data and logs for a later visit. Let us see how actually Tekton Results
works under the hood.
### How Tekton Results Works?
Tekton Results is composed of two main components.
- A **watcher** to listen to creation/update of PipelineRuns or TaskRuns.
- An **API Server** to query the persistent storage for data.
In addition to that, Tekton Results needs a working database connection that can
be a persistent storage on the same cluster or hosted externally such as RDS.
If no external storage is attached, logs are also stored on a persistent storage
on the cluster, you may use a S3 (or compatible) storage solution for that.
The lifecycle of a _result_ is as below:
1. The first step is to create a Tekton PipelineRun or TaskRun.
2. The Watcher listens for any changes in the TaskRun or PipelineRun.
3. On change, Watcher updates (or creates) a corresponding `Record` or `Result` using the Results API.
Watcher adds annotations to the TaskRuns or PipelineRuns with proper identifiers. Watcher uses
these annotations to decide if the `Result` has been created/updated/finished or not.
4. You can now query the Results data using the API. If the run state is incomplete yet, the response
from the API will indicate that as well via the status flag.
5. Once the TaskRun/PipelineRun has been completed, you can safely prune the resource object.
## Installing Tekton Results
Installing Tekton Results is easy. You can use Kubernetes or OpenShift cluster, for this particular
demonstration, I will be using a Kind cluster and a local database.
### Prerequisites
- [Kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) for a local Kubernetes cluster.
- [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
- [curl](https://curl.se/download.html) for querying the API.
- [OpenSSL](https://www.openssl.org/source/) for generating certificates.
### Let's start
1. Create a Kind Cluster
```bash
kind create cluster --name tekton-results
kind export kubeconfig --name tekton-results
```
2. [Tekton Pipelines](https://github.com/tektoncd/results) must be installed on
the cluster. You can install it using the command below.
```bash
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml
```
3. Generate a database root password and store as a Kubernetes Secret. If you are using an external
database, prove the credential for the same. Here is a bare minimum requirement as YAML.
```yaml
apiVersion: v1
kind: Secret
metadata:
name: tekton-results-postgres
namespace: tekton-pipelines
type: Opaque
data:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: <your-password>
```
You can directly use the command line as well:
```bash
kubectl create secret generic tekton-results-postgres \
--namespace="tekton-pipelines" \
--from-literal=POSTGRES_USER=postgres \
--from-literal=POSTGRES_PASSWORD=$(openssl rand -base64 20)
```
4. Generate a cert/key pair. You may use any cert management software to generate this. You can even
use cluster generated certs.
```bash
openssl req -x509 \
-newkey rsa:4096 \
-keyout key.pem \
-out cert.pem \
-days 365 \
-nodes \
-subj "/CN=tekton-results-api-service.tekton-pipelines.svc.cluster.local" \
-addext "subjectAltName = DNS:tekton-results-api-service.tekton-pipelines.svc.cluster.local"
```
5. Create another TLS Kubernetes Secret with the name `tekon-results-tls` to store the cert/key pair.
```bash
kubectl create secret tls -n tekton-pipelines tekton-results-tls \
--cert=cert.pem \
--key=key.pem
```
6. Install Tekton Results
```bash
kubectl apply -f https://storage.googleapis.com/tekton-releases/results/latest/release.yaml
```
7. You can check the status of the deployments using the below command. Do not worry
if some deployments show `CrashLoopBackOff`. Wait for some time, and
they should all be running.
```bash
kubectl get pods -n tekton-pipelines --watch
```
Once all deployments are ready, we can start creating some TaskRuns/PipelineRuns. In the next part
of this blog, I will explain how to retrieve data from Tekton Results. Happy Reading.
## References
- [Tekton Results](https://github.com/tektoncd/results)
- [Tekton Pipelines](https://github.com/tektoncd/pipeline)
@@ -1,92 +0,0 @@
---
category: blogs
date: 2021-01-04T21:47:00
image: /images/hrt-singapore.webp
tags:
- HRT
- hudsonrivertrading
- interview
- internship
title: HRT (Hudson River Trading) Systems Internship Interview Experience
---
I applied for **Systems Internship - Summer 2021** back in December 2020
at [Hudson River Trading](https://www.hudsonrivertrading.com), New
York. The internship description was: -
> We are looking for highly motivated students who are eager to learn
> and excited about systems to join us for our summer internship
> program. As a systems intern, you may have the opportunity to work on
> projects in the following areas:
>
> - Programming/scripting (Golang, Python, C++, C)
> - FOSS development
> - HPC, Cluster computing
> - System Administration
> - Linux, Debian
> - Linux-based computer security
> - Data Storage
> - Large deployment or config management
The first step was a coding test on the Codility platform. If you have
used any of the online coding platforms, this is similar. It was a
`2.5 hrs (90 mins)` test consisting of 3 questions. They let you use
`online references (documentation, man pages, etc.)` but **do not copy
the code** as it will highly reduce your chances of qualifying for this
first stage. You can choose between **C/C++**, **Python** and **Golang**
(no Java 😪).
Questions were clear and of medium level. But they were designed in such
a way that you must know the basics before you could attempt. Also, they
expected a clear and concise approach. Two of the most important points
in their instructions were: -
> - While correctness and performance are the most important factors
> for evaluation, we will take test duration into account as well.
> - Please understand that this test is meant to be challenging. A
> perfect score is not necessary to move on to future interview
> rounds, so do the best you can!
So, you must be near perfect in your approach as well as on time. I did
them kind of quickly. They will show you a summary of your submission
but not the results. It will take almost 2 weeks to get back to you for
further steps.
Next, I received a mail invitation for a telephonic interview. **This
interview will last about 45 minutes and will be technical but will not
require coding. Interview topics may include your background,
programming languages, and Unix/Linux concepts**. Once you receive this
mail you can then decide a time slot for an interview.
I was not sure what they will ask if this is not a coding interview. The
interviewer was very polite, and he was explaining the questions too.
Questions were not so tricky but practical and real-life. Since it was
**not for SDE role**, the questions were mostly related to Linux/Unix,
C++ (mainly pointers and memory), Python/Bash scripting, automation,
knowledge of tools (IDEs, Editors, System Administration Tools) and
previous experiences. The interview would often explain why he is asking
this question, this was very nice. Then some common interview questions,
why do you want to work for this role? What makes you fit for this role?
etc.
One thing that I want to point out is that the interviewer was
repeatedly checking my resume, and for the most part he did not ask
anything that was not on my resume. So, my tip is to create a nice
resume with genuine work/tool experiences. And when you are applying for
such a role, it would be helpful if you mention mathematics or other
courses that you have taken. *Do not lie on your resume*. They will
easily catch that.
The other thing is to keep your words short and clear; I was not great
at communication, but you can be. If the interviewer allows then use
examples for the things you cannot explain. I used nice examples. At
last, he gave me short feedback on how well I performed.
At last, I want to point out things I should not have done. The first
is, I did not ask much about the role, you must do this at least once.
Second, I am talkative, I do not know if the interviewer was not faking
his expressions (because he would often discuss in-depth), but not all
interviewers will be the same. So, do not talk too much, nor too less.
At last work on your communication skill, mostly how you to present
things and how to answer technical as well as behavioral questions. I
was not fluent, but my way of presentation might have saved me.
@@ -1,247 +0,0 @@
---
category: blogs
date: 2024-09-22T05:47:00
description: Privacy is just like hope. It is the quintessential human delusion,
simultaneously the source of your greatest strength and your greatest weakness.
This post outlines my switch to GrapheneOS and my experiences so far.
image: /images/grapheneos-kill-bloat.webp
tags:
- grapheneos
- privacy
- degoogle
- android
- pixel
- google
- security
title: "GrapheneOS Saga: The Privacy-Centric Midlife Crisis"
---
In **The Matrix Resurrections**, Morpheus says *Not all seek to control. Just as not all wish to be
free*. The ever-increasing cases of privacy invading technology and the number of people sprinting
to adopting them reflects the quotes in its entirety. It is true that in the modern world it is
nearly impossible to have control of your complete data. But with few changes, you can decide how
much one has access to your data. Do remember once anything is on internet, it is forever.
## My Smartphone Journey
I got my first smartphone in 2014. It
was [Samsung Galaxy Star Pro](https://www.gsmarena.com/samsung_galaxy_star_pro_s7260-5749.php), a
very basic budget smartphone with Android 4.1. I used it until mid-2019, then for a few months I
used ASUS ZenPhone Go. It belonged to my friend. This also means I have never used 3G on smartphone.
It was a direct jump from 2G to 4G.
My first good smartphone
was [Nokia 6.1 Plus](https://www.gsmarena.com/nokia_6_1_plus_(nokia_x6)-9178.php). Excellent build
quality, clean OS with decent performance. Camera quality was surprisingly excellent considering
that it had almost no AI-based processing. Nokia can be a market leader in smartphone, but it seems
either they don't care much or they aren't putting much effort. I had to leave this phone in a year
because of severe charging port issue. Other than that it is still one of my most favourite
smartphone.
Then I bought [Google Pixel 4a](https://www.gsmarena.com/google_pixel_4a-10123.php) in January of
2021. First gadget bought with my first earning. Pixel 4 and 5 series are my most favourite
smartphones still. These are ergonomic and handy phones without many bells and whistles. The design
is nice with good performance and clean OS. After these, things started going bad.
My current smartphone is [Google Pixel 7a](https://www.gsmarena.com/google_pixel_7a-12170.php)
bought in 2023. It is good, but for the price I would expect a little more. Takes excellent photos
and the performance is decent. The stock OS is unfortunately not as clean as it used to be.
## Why GrapheneOS?
Before I can explain why I choose GrapheneOS, I should explain what I need. It can vary person to
person and phone to phone. But the keywords are the same, privacy, security, performance and
control.
### What I Do Not Need on My Smartphone
This is a very opinionated list of things I do not want on my phone. This is in part inspired by
privacy and performance concerns. A lot of it comes from my way of interacting with smartphone.
- AI: It is wonderful in quantities in which wine can be enjoyed. Too much of it and the phones
behaves exactly like a drunken, too much talk but very little of it makes any sense.
- Apps I will never use: Every smartphone comes with some set of preinstalled applications. Some of
them as crucial for the phone to function normally. Some of them are useful but may have an
alternative. And others neither crucial nor useful. And on most phones you cannot even
uninstall/disable them. It makes no sense to keep two apps with same functions or apps with no
functions.
- Spyware/Malware/Adware/Bloatware: On many smartphones these are intentionally installed. OK, maybe
not the first two, but definitely the next two. Most of the Chinese smartphones are riddled with
Adware and Bloatware, probably the reason why they are so cheap. They are privacy nightmares and
eat up your performance and battery.
- Inability to control permissions: A smartphone is a huge data generator and gatherer. If wrong
entities have access to it, they may use it for nefarious purposes. One of the shocking example
is [How Facebook was able to track location using accelerometer](https://www.cpomagazine.com/data-privacy/facebooks-use-of-alternate-location-tracking-methods-to-circumvent-apple-privacy-protections-expands-to-accelerometer-data/).
So I would like to oversee what permissions each application has.
- Gimmicks: IYKYK
I still want my phone to be usable and have regular updates. I want it to perform close to what it
was designed for.
### It just makes sense
Once you are clear that what you do not want on your smartphone, GrapheneOS immediately makes sense.
I can achieve everything listed above and more. I actually researched and planned for almost a year
before I finally installed it. Now that I have done it, I think there is no going back.
## Installing using Fedora
GrapheneOS can be installed using WebUSB or via command line. Both are simple, but WebUSB is
simpler. Since Fedora is not in
the [supported OS](https://grapheneos.org/install/web#prerequisites). WebUSB may not work, for me,
it didn't. So I opened my favourite tool, the terminal and started
typing. [Installation via CLI](https://grapheneos.org/install/cli) works flawlessly as long as you
follow it step by step. There are few extra steps you might need for Fedora, that I will be
explaining here:
1. Install these packages:
```bash
sudo dnf install android-tools
```
2. Follow the official instructions up
to [OEM unlocking and booting into bootloader](https://grapheneos.org/install/cli#booting-into-the-bootloader-interface)
3. Check if fastboot can detect your device
```bash
sudo fastboot devices
```
4. After that, you can continue following the instructions. Use `sudo`.
Wait patiently, as it takes some time and there is not much interactive response. Be sure that the
process has ended successfully before you disconnect your phone.
## First Impressions
The onboarding was short and clean. No account logins, no spooky agreements to accept. Once you set
up your phone, it should feel like a minimal installation of any Linux distros, few necessaries
preinstalled apps and nothing else.
In GrapheneOS all apps are sandboxed, no matter what is its origin. They have similar permission
scopes and no app is treated as royalty. On stock Android, some Google apps have system level
access, which they absolutely don't need for function. Unlike most custom OS available, GrapheneOS
is a completely de-Googled OS. You can see a detailed
comparison [here](https://eylenburg.github.io/android_comparison.htm). This means you should be just
fine without any Google Apps at all.
## Getting It To Speed
I wanted to retain my ease of use and most of previous apps. Some of them may be privacy invading
but with newly gained superpowers, I should be able to control them. I do use a fair share of Google
Apps as well as FOSS applications.
![Fully Configured GrapheneOS - Lockscreen, HomeScreen and Apps Menu](/images/grapheneos-looks.webp)
### My daily drivers
These are everyday applications, like calendar, payment and banking apps, maps, messaging, phone,
contacts, browser, email etc. To install apps from the Play Store, you will need to install Play
Services first. This is easy, just go to the App Store and install them.
### Enhancers
There are few apps, mostly FOSS, that I use to improve my experience. In no particular order (its
alphabetic):
- [AdGuard Home Manager](https://github.com/JGeek00/adguard-home-manager): An AdGuard Home client
app, that lets me quickly control and manage my self-hosted AdGuard Home installation.
- [Aegis](https://getaegis.app/): Probably the best 2FA apps that is also FOSS. Compared to popular
options like Google Authenticator, it encrypts your token at rest, lets you import and export as
well as take encrypted backups.
- [Immich](https://immich.app/): A FOSS and self-hosted Google Photos replacement. Except editing,
it has everything you may need in a media backup app. Even more features are being added
regularly.
- [Insular](https://secure-system.gitlab.io/Insular/): I use this to enable a separate work profile
where I keep all my less used or data hungry applications. When not in use, I can just pause them,
and it saves battery as well as enhances privacy.
- [Lawnchair](https://lawnchair.app/): To be frank, I am unable to find a launcher that fits to my
liking. My favorite launcher is still the OP Nokia Lumia launcher. Lawnchair is a Pixel launcher
replacement with a lot more features and customizations. I use it
with [Arcticons](https://arcticons.com/).
- [ServerBox](https://github.com/LollipopKit/flutter_server_box): I use this to keep an eye on my
servers and even make small updates via ssh.
- [Tailscale](https://tailscale.com/): Three of the apps mentioned above will be unusable if not for
Tailscale. In layman terms, it is a p2p VPN that tricks all the participating devices like they
are connected in same local network. So you can access your remote servers and data without ever
exposing them to internet. Additionally, it also redirects your DNS request to a custom server (
like AdGuard Home) or even make one of your devices act as exit node.
## Things I Loved
New OS, new experiences and new things to love. There are many things that made me say _**Wow**_,
but I will point out the most significant changes in my smartphone experience.
### Game-changers
- Google Pixels are known for churning out good performance out of comparatively less powerful
hardware. With recent AI outbreak, Google and other organizations are putting too much of it even
in places, that makes little sense. GrapheneOS is clean from all that bloat, not even the
Assistant. If I really need it, I can install specific applications.
- Battery life improvement is the biggest visible change I observed. I am now getting around 25%
more screen time than before with similar uses.
- I can now decide what permission each app has as well as stop their access to network completely
without relying on a third party app. You also get fine control for your location data as well as
activity indicator.
- As I mention in my first point, Pixels have good performance, but GrapheneOS takes it to another
level. My phone feels significantly faster. This should be expected since you no longer have bloat
apps running in background.
### Little things
- You can archive any installed application instead of removing them. This makes sure that you don't
have to set up again but still get rid of them in practice.
- Ability to install apps in user profiles without any App Store installation.
- The usual things, you can see the complete list of improvements/new things
on [GrapheneOS features](https://grapheneos.org/features) page.
## Things That Went Wrong
Yes, not everything is great with GrapheneOS. There were some downsides, some failures as well loss
of data. I backed up all my data before making the switch and still got a few things wrong.
### Horribly Wrong :(
- I lost my WhatsApp data completely. I am still a bit sad about it. This happened because WhatsApp
couldn't detect active backup on my Google Drive and decided to start new. This is a scary example
of how dependent everything is on Google, if WhatsApp had allowed independent backup, this would
not have happened. I did find a probable fix, but after I lost my data. You can use _Transfer
Chats_ feature of WhatsApp to transfer between phones. But you need two phones with latest
versions of WhatsApp, so not possible for me anyway. There was a lot of not-important data, few
important and some which I wanted to remove but couldn't. So the destiny decided it for me, it
seems.
- GrapheneOS doesn't have a great backup solution. It uses an implementation of Seedvault, which is
secure but not reliable at all. Most of the time it simply doesn't work. Except USB backup,
nothing worked for me. That also means you have to regularly take manual backup.
### Manageable
- All banking apps worked, except PayTM. After some research, I found that it is not GrapheneOS
fault. It seems PayTM hardcoded application used for webview. The usual _Android System Webview_
is not available neither installable on GrapheneOS since it uses its own implementation. It is
okay, because I always use a different payment app.
- Getting location to work was a little tricky. The first few attempts completely failed. GrapheneOS
uses something called _Reroute location request to OS_ which limits when and how Play Services can
access location. A great privacy feature, but it took some time to work.
## Things I am missing
- Reliable backups would be a major missing. The GrapheneOS seems to be working on it, but it may
take time.
- Some of the features are not latest compared to Stock Android or even completely missing, i.e.
Wallpaper Chooser, Extreme Battery Saver, Digital Wellbeing, pausing of apps. I understand that
these may not be a priority for the team, so it's okay.
- I loved _Now Playing_ feature on Pixel, it is not available.
- Although GrapheneOS is extremely minimal, there are still apps you cannot remove. The preinstalled
apps for dialer, contacts and cameras are simple and do the work, but the UI is pretty outdated,
and they do not have many features. So I installed alternatives, but I cannot remove them. Some of
them can be disabled though.
- There are few UI issues that need fixing. Not anything critical, but sometimes it bothers.
## References
- [GrapheneOS Website](https://grapheneos.org/)
- [Comparison of Android ROMs](https://eylenburg.github.io/android_comparison.htm)
- [Installation using Fedora - Forum](https://discuss.grapheneos.org/d/359-fedora-to-install-grapheneos/4)
- [The Matrix Resurrections](https://www.imdb.com/title/tt10838180/)
@@ -1,4 +0,0 @@
---
title: Setup Remark42 from scratch on Oracle Cloud
draft: true
---
@@ -1,312 +0,0 @@
---
category: development
date: 2021-05-24T23:56:00
description: CMake stands for Cross-platform Make. Normally, a build tool like Make
will parse a configuration file (Makefile) that contains all the commands required
to build an artifact based on the source files and other resources inside the project.
image: /images/cmake-office.webp
slug: cmake-basics
tags:
- cmake
- gsoc
- fossology
- gsoc21
title: Hello CMake
---
CMake stands for Cross-platform Make. Normally, a build tool like Make
will parse a configuration file (Makefile) that contains all the
commands required to build an artifact based on the source files and
other resources inside the project.
I proposed a new architecture for FOSSology that uses CMake instead of
bare-metal Make as a Google Summer of Code 2021 project. Although these
tutorials will be useful for anyone interested in learning CMake they
are specifically tailored to the FOSSology project. This is the first
blog on CMake in this series. In this blog, I will discuss CMake syntax
and various features.
## What is CMake?
![You CMake me happy:left](/images/cmake-happy.webp)
CMake stands for Cross-platform Make. Normally, a build tool like Make
will parse a configuration file (Makefile) that contains all the
commands required to build an artifact based on the source files and
other resources inside the project. On the other hand, CMake will also
parse a configuration file (CMakeLists.txt), but instead of directly
build the artifact, itll generate another configuration file that will
build the artifact.
This approach is very common in Computer Science and is called *adding
another level of indirection*. In short, you may say that:
With just one configuration file youll be able to generate different configuration files to build your project for different platforms (Make, Visual Studio, etc).
Another nice CMake feature is the so-called out-of-source build. Any
file required for the final build, executables included, will be stored
in a separated build directory (usually called build/). This prevents
cluttering up the source directory and makes it easy to start over
again: just remove the build directory and you are done.
## CMake Syntax
![Compiling:right](https://imgs.xkcd.com/comics/compiling.png)
CMake unlike Make is a configuration language itself. CMake supplies a
rich library of inherent functions as well as common programming
language features like conditions, looping, macros, and functions. In
addition to that CMake is highly modular and you can always write a
CMake module yourself independent of any project. Specifically for C/C++
programming, it supplies commands to find and link libraries
automatically and lot many features.
### Language Rules
As mentioned above CMake is a language itself hence there are some
language rules related to syntax, comments, variables, etc.
- There are two types of comment in CMake, both start with `#`
character. The first one is line comments, as clear by name it is
delimited by a newline. The other one is bracket comment and can
span until the matching brackets are found.
```cmake
# This is a line comment and it ends with the line.
#[[This is a bracket comment and it can span up to multiple lines.
But it is only supported in CMake 3.0 or later.]]
```
- Variables in CMake are like any other programming language. They are
case-sensitive and have any alphanumeric characters. In general, it
is recommended using upper case names as variables. They can be
assigned and unassigned using `set` and `unset` commands. A variable
can be referenced using `${VARIABLE_NAME}`.
> CMake reserves some types of identifers:
>
> - begin with **CMAKE_**(upper-, lower-, or mixed-case)
> - begin with ***CMAKE***(upper-, lower-, or mixed-case)
> - begin with **_** followed by the name of any CMake Command
- The CMake commands are case insensitive in the latest version (3.0)
of CMake. That means `message()`, `Message()` or `MESSAGE()` are all
same.
### Basic CMake Commands
- The `project()` command is used to set the name of the CMake project
and optionally a language that is used by the project. Every
top-level CMake configuration must have this option set. The syntax
is as below:
```cmake
project (projectname [CXX] [C] [Java] [NONE])
```
If no language is specified then CMake defaults to supporting C/C++.
If `NONE` is specified then no language support is enabled.
- The `set()` command is used to set a variable to a value or lists of
values. It is one of the most used CMake commands. The accompanying
command is `unset()`. The `unset()` command is used to unset a
variable or remove a variable from the current scope. The syntax for
the three commands are:
```cmake
set (BLOG_TITLE "CMake Introduction") # assign single value
set (BLOG_TAGS "gsoc" "cmake" "fossology" "gsoc21") # assign a list of values
unset (BLOG_TITLE) # unset BLOG_TITLE
```
- The `message()` command can be used to display formatted messages
with different alert modes. There are many
[modes](https://cmake.org/cmake/help/v3.20/command/message.html#general-messages)
of displaying messages. The syntax is :
```cmake
message ([<mode>] "message text" ...)
message(NOTICE "Hey this is ${BLOG_TITLE}") # Example message with variable
```
- The `cmake_minimum_required()` is used to set the minimum CMake
version to use to generate the build files. If any older version is
used than specified then the user gets an error message. It must be
specified at the top of the *CMakeLists.txt* file.
```cmake
cmake_minimum_required (VERSION 3.0)
```
- The commands `add_executable()` and `add_library()` specifies what
executables and libraries to build and what source files must be
used to build them. One of the two commands must be used for any
binary generation.
```cmake
add_executable(<name> [WIN32] [MACOSX_BUNDLE]
[EXCLUDE_FROM_ALL]
[source1] [source2 ...])
add_library(<name> [STATIC | SHARED | MODULE]
[EXCLUDE_FROM_ALL]
[<source>...])
```
### Flow Control
CMake provides three flow control structures. They are conditional
statements (`if`), looping constructs (`foreach` and `while`) and
procedure definitions (`function` and `macro`). I will explain each of
them one by one.
- **Conditional Statements** The `if` command in CMake is just like
the `if` command in any other language. It evaluates its expression
and based on that either executes the code in its body or optionally
the code in the `else` clause.
```cmake
if (FOO)
# do something here
elseif (BAR)
if (NESTED_BAR)
# do something nested here
endif(NESTED_BAR)
# do something else
else ()
# do something here
endif (FOO)
```
You can use many operators to form complex conditions. Available
options are **NOT**, **AND**, **OR**, **COMMAND**, **DEFINED**,
**EXISTS**, **IS_DIRECTORY**, **IS_ABSOLUTE**, **MATCHES**,
**IS_NEWER_THAN**, and operators for numerical comparisons
**EQUAL**, **LESS**, **GREATER**, **STRLESS**, **STREQUAL**,
**STRGREATER**.
- **Looping Constructs** The `foreach` command enables you to execute
a group of CMake commands repeatedly on the members of a list.The
first argument of the foreach command is the name of the variable
that will take on a different value with each iteration of the loop.
The remaining arguments are the list of values over which to loop.
```cmake
foreach(<loop_var> <items>)
<commands>
endforeach()
```
The `while` command provides for looping based on a test condition.
The format for the test expression in the `while` command is the
same as that for the `if` command described earlier.
```cmake
while(<condition>)
<commands>
endwhile()
```
It is worth mentioning that foreach loops can be nested and that the
loop variable is replaced prior to any other variable expansion.
This means that in the body of a foreach loop you can construct
variable names using the loop variable.
- **Procedure Definitions** A function in CMake is very much like a
function in C or C++. You can pass arguments into it, and the
arguments passed in become variables within the function. The first
argument is the name of the function to define. All additional
arguments are formal parameters to the function.
```cmake
function(<name> [<arg1> ...])
# write the function body here
<commands>
endfunction()
```
Macros are defined and called in the same manner as functions. The
main differences are that a macro does not push and pop a new
variable scope, and the arguments to a macro are not treated as
variables but are string replaced prior to execution. This is very
much like the differences between a macro and a function in C or
C++. The first argument is the name of the macro to create. All
additional arguments are formal parameters to the macro.
```cmake
macro(<name> [<arg1> ...])
# write macro definition here
<commands>
endmacro()
```
## A Hello CMake example
This example compiles a simple *hello_cmake* program. This example and
the terminal commands are used in Linux context, however there is very
little difference in different platforms. Make sure to [install
CMake](https://cmake.org/install/) for your platform.
- Create a folder and create a file named `hello_cmake.cpp` in that.
You may add your own code. Here is my example code.
```cpp
#include<iostream>
int main() {
std::cout << "Hello CMake\n";
return 0;
}
```
- Create another file named `CMakeLists.txt` and add the following
script in that file.
```cmake
cmake_minimum_required(VERSION 3.0)
# set project name
project(hello_cmake)
# print compiler info
message("The compiler is ${CMAKE_CXX_COMPILER}")
# add executable
add_executable(Hello_cmake hello_cmake.cpp)
```
- Create another directory `build` and run the following commands.
```bash
# create folder and change directory
mkdir build && cd build
# run cmake config
cmake ..
# build project
cmake --build .
```
You will be able to see a `Hello_cmake` binary in the *build* folder.
Hooray you have successfully built a project using CMake. For more [read
here](https://cmake.org/cmake/help/v3.20/guide/tutorial/index.html). In
the next blog I will explain how to create CMake configuration for a
more complex project.
Thanks!
## References and Credits
- [CMake Website](https://cmake.org)
- [CMake
Documentation](https://cmake.org/cmake/help/latest/index.html)
- [Mastering CMake Book](https://www.kitware.com/what-we-offer/#books)
- [CMake
Tutorial](https://cmake.org/cmake/help/v3.20/guide/tutorial/index.html)
- [You (C)Make Me
Happy](https://prateekvjoshi.com/2014/02/01/cmake-vs-make/)
- [Compiling xkcd.com](https://xkcd.com/303/)
@@ -1,129 +0,0 @@
---
category: development
date: 2022-02-25T20:47:00
description: I made it to the Red Hat as a DevTools intern. This post is about onboarding
and how I prepared myself for working on the actual project.
image: /images/fedora-wall.webp
tags:
- kubernetes
- redhat
- docker
- golang
- tekton
- openshift
- intern
title: My internship at Red Hat
---
I have been contributing to open source for the last 3 years and Red Hat
was one of the companies that I was very fond of. I must say all my
contributions and consistency paid off, and I made it to the Red Hat as
a DevTools intern. This post is about onboarding and how I prepared
myself for working on the actual project.
On the first day of my internship, I met two amazing teammates
[Saytam](https://github.com/) and [Utkarsh](https://github.com/). We
were also introduced to a Senior Software Engineer [Piyush
Garg](https://github.com) who later mentored us. The initial few
meetings were more on the introduction and what to learn topics. Before
I jump into more details let me explain first what does a **DevTools
Developer/Engineer** do?
## What does a DevTools Developer/Engineer do?
From [MDN Web
Docs](https://developer.mozilla.org/en-US/docs/Glossary/Developer_Tools)
**Developer tools (or "development tools" or short "DevTools") are
programs that allow a developer to create, test, and debug software.**
At RedHat, a lot of open source developer tools of industry standards
are developed. There are many, OpenShift, Tekton, CodeReady containers,
and many more.
## Learning on the Go
There was a lot of learning and still a lot to learn. In a meeting with
my manager [^1] Pradeepto Bhattacharya, I was told that I will be working on
TektonCD or OpenShift Pipelines, and both of them require a sound
knowledge of Golang, CI/CD, Containers, Docker, and Kubernetes. I was
familiar with CI/CD, containers, and Docker but never used Golang and
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.
### 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
for new programmers to quickly understand the language and for seasoned
veterans to easily read each other's code.
- [Official Go Documentation](https://go.dev/doc/) - *Start from here*
- [Go by Example](https://gobyexample.com/) - *bite-size examples for
most of the golang features*
- [Golang tutorial series -
GOLANGBOT.COM](https://golangbot.com/learn-golang-series/) - *in-depth
tutorial of golang*
- [Effective Go](https://go.dev/doc/effective_go) - *writing good golang
programs*
- [The Go Playground](https://go.dev/play/) - *official online golang
ide*
- [The Go Programming Language - Book](https://www.gopl.io/) *for
learning advanced level golang*
- [Golang Tutorial for Beginners | Full Go Course - TechWorld with
Nana](https://youtu.be/yyUHQIec83I) *if you prefer video tutorials, I
don't :)*
### Docker
Docker takes away repetitive, mundane configuration tasks and is used
throughout the development lifecycle for fast, easy, and portable
application development - desktop and cloud. Docker's comprehensive
end-to-end platform includes UIs, CLIs, APIs, and security that are
engineered to work together across the entire application delivery
lifecycle.
![The Docker Architecture](/images/docker-architecture.webp)
- [Docker and Containers -
Katacoda](https://www.katacoda.com/courses/docker) *interactive
lessons on docker and containers*
- [Docker for beginners](https://docker-curriculum.com/)
- [Docker Tutorial for Beginners | TechWorld with
Nana](https://youtu.be/3c-iBn73dDE) *video tutorial*
### Kubernetes
![Kubernetes tech:left](/images/kubernetes-meme.webp)
**Kubernetes** is the Greek word for a ship's captain. We get the words
Cybernetic and Gubernatorial from it. The Kubernetes project focuses on
building a robust platform for running thousands of containers in
production.
- [Learn Kubernetes -
Katacoda](https://www.katacoda.com/courses/kubernetes) *interactive
lessons with kubernetes*
- [kube by example](https://kubebyexample.com/) *learn by doing*
- [Kubernetes Tutorial for Beginners](https://youtu.be/X48VuDVv0do)
*video tutorial*
## *Not so Minimal* Tekton Server
In late January, we were asked to implement our learnings and deep dive
into Kubernetes and TektonCD through an assignment project. Soon we
realized that whatever we were learning so far was not even close to
what we were going to implement. We were given a document containing the
requirements of the applications we were supposed to create along with
all the documentation and architectural diagrams.
The application was called **Minimal Tekton Server**. It is a set of
three different applications, i.e a server, a CLI, and a dashboard. In
short, this application is supposed to *listen to custom resources being
created and then transfer the request to Tekton API to create the
corresponding resource on the OpenShift/Kubernetes cluster.*
So are you interested in how it went? Please follow up with my [next
blog](https://avinal.space/posts/development/lovely-dangerous-things-redhat).
[^1]: [MDN Web
Docs](https://developer.mozilla.org/en-US/docs/Glossary/Developer_Tools)
@@ -1,220 +0,0 @@
---
category: development
date: 2022-02-27T20:47:00
description: This blog is a descreptive account of the development of Minimal Tekton
Server. This is highly technical in nature, so please make sure that you have sufficient
knowledge about Golang, Docker, Kubernetes and TektonCD. You can refer to my [previous
blog]("https://avinal.space/posts/development/i-am-loving-it-redhat.html") to know
about these topics.
image: /images/development.webp
modified: 2022-03-07 22:47
tags:
- tekton
- go
- kubernetes
- openshift
- redhat
- intern
- golang
- openshift-pipelines
title: Developing Minimal Tekton Server
---
This blog is a descreptive account of the development of Minimal Tekton Server.
This is highly technical in nature, so please make sure that you have sufficient
knowledge about Golang, Docker, Kubernetes and TektonCD. You can refer to my
[previous blog]("https://avinal.space/posts/development/i-am-loving-it-redhat.html")
to know about these topics.
As mentioned in my last blog, we were given to implement an application
named **Minimal Tekton Server**. The problem statement reads:
> We will be designing and implementing an application that will be
> talking to Tekton APIs to create resources on a Kubernetes/OpenShift
> Cluster. The application will expose some fields of the Tekton
> Resources which the user will provide and then this application will
> create Tekton resources by talking to Tekton APIs available on the
> cluster to create the resources based on the user-provided fields.
There are three parts in this project for the application and two more
parts for the CI/CD using TektonCD and Kubernetes/OpenShift. I will go
through each part descriptively and try to explain what we did.
## The Architecture of MKS
The first task in the development of the Minimal Tekton Server was
creating its architectural diagram. Our first diagram was trash compared
to the final diagram. Yeah, we learned. I will be explaining our
final(obviously) architectural diagram and try to make some sense out of
band-aids and duct tapes.
![The MKS Architecture](/images/mks-architecture.webp)
Let me start with explaining **What are MKS Resources?**. I hope you
know at least tidbits about Kubernetes and by the definition: *A
resource is an endpoint in the Kubernetes API that stores a collection
of API objects of a certain kind; for example, the built-in
`pods` resource contains a collection of Pod objects.* But
developers soon realized that these in-built resources were not enough
for the ever-growing applications of Kubernetes. Here [custom
resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
comes into the picture. *A custom resource is an extension of the
Kubernetes API that is not necessarily available in a default Kubernetes
installation.* To define a custom resource we use something called
[Custom Resource
Definition](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/).
So MKS Resources are such custom resources that correspond to the
TektonCD custom resources.
![A venus flytrap engulphing an insect.:right](/images/venus-flytrap.gif)
Let us now focus on the box containing `Controller` and `API server`.
The controller can be said as a stimulus-response mechanism. Take the
analogy of a Venus Flytrap plant. The trap is initially open. There are
`trigger` hairs on the inside of the trap. Once an insect is detected,
there is a change of state and the trap closes in a blick on the eye.
The controller works the same way. It listens for the change in the
state of the MKS resources and immediately transfers the request to the
Tekton API to reflect the change in the corresponding Tekton resources.
The changes can be creation, deletion, or updating. The API server
ensures that there is a working connection between our controller and
the Tekton API.
MKS Server also exposes APIs to introduce a change of state in the MKS
resources. In technical terms these are called `verbs`. There are five
such verbs that we have exposed: `create`, `update`, `get`, `delete`,
and `list`. They can be utilized by a REST client, or in our case **MKS
CLI** to introduce desired change. The MKS command-line interface
provides commands and subcommands to do the desired tasks.
Whenever there is a change in the state, there is a logic running inside
the controller to react on that and that also affects our database. We
store four datapoints in our database: `created`, `deleted`,
`completed`, and `failed`. They tell us about the current statistcs of
our MKS resource using a single-page web app called **MKS Dashboard**
(or UI).
This was about the architecture of the Minimal Tekton Server. Let us
jump into more technical stuff.
## How to implement a CRD controller?
During this assignment, something that took the most time and effort was
the implementation of a controller for our custom resources. This isn't
very hard if you go by the rules and do the things according to the
well-defined documents and blogs since this is a standard step in the
implementation of any custom resource controller. But did we follow the
rules? Hell no! But this time, let us go step-by-step.
1. The first step is to define a `CustomResourceDefinition` for our custom
resource. Let us define a CRD called `spacetime`. To do this you can write a
YAML file like below.
```yaml
# file: spacetime-crd.yaml
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
# name must match the spec fields below, and be in the form: <plural>.<group>
name: spacetimes.example.com
spec:
# group name to use for REST API: /apis/<group>/<version>
group: example.com
# list of versions supported by this CustomResourceDefinition
versions:
- name: v1alpha1
# Each version can be enabled/disabled by Served flag.
served: true
# One and only one version must be marked as the storage version.
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
message:
type: string
# either Namespaced or Cluster
scope: Namespaced
names:
# plural name to be used in the URL: /apis/<group>/<version>/<plural>
plural: spacetimes
# singular name to be used as an alias on the CLI and for display
singular: spacetime
# kind is normally the CamelCased singular type. Your resource manifests use this.
kind: SpaceTime
# shortNames allow shorter string to match your resource on the CLI
shortNames:
- st
```
You can learn more about the fields and options
[here](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/).
The CRD that we defined above corresponds to the `CustomResource` given
below. Once you apply the above file you will be able to see the
`spacetime` custom resource on your Kubernetes/OpenShift cluster.
```yaml
# file: spacetime-cr.yaml
apiVersion: spacetimes.example.com/v1alpha1
kind: SpaceTime
metadata:
name: spacetime-cr
spec:
message: "Hello from space!"
```
Apply them using the following commands:
```bash
kubectl apply -f spacetime-crd.yaml
kubectl apply -f spacetime-cr.yaml
```
1. Once we have defined our custom resources, we need to define the
types that will correspond to this custom resource definition. This
can be done using `k8s.io/apimachinery/pkg/apis/meta/v1` package
written in golang. Did I tell you that this is all in golang? Well,
now you know. Create a package structure for a golang project and
add the definition of the type as given below.
```bash
mkdir -p pkg/api/spacetime/v1alpha1
touch pkg/api/spacetime/v1alpha1/{spacetime_types,register,doc}.go pkg/api/spacetime/register.go
```
Add the following content to the corresponding files.
```go
// file: /pkg/api/spacetime/v1alpha1/spacetime_types.go
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type SpaceTime struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec SpaceTimeSpec `json:"spec"`
}
type SpaceTimeSpec struct {
Message string `json:"message"`
}
type SpaceTimeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []SpaceTime `json:"items"`
}
```
### Attribution
- Photo by [Luca Bravo](https://unsplash.com/@lucabravo?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/photos/XJXWbfSo2f0?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText).
@@ -1,212 +0,0 @@
---
category: development
date: 2021-02-02T21:47:00
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.
image: /images/waka.webp
tags:
- wakatime
- github-action
- coding
title: How I implemented WakaTime embeddable Coding Graph GHA?
---
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
This GitHub Action is divided into three parts. I didn't want to use
Docker but it seems it doesn't work well without it. Let dive a little
into technical details. Three parts are as below.
1. [main.py](https://github.com/avinal/Profile-Readme-WakaTime/blob/master/main.py)
python script. This script contains many procedures.
- [Getting JSON data file via WakaTime
API](https://github.com/avinal/Profile-Readme-WakaTime/blob/master/main.py#L52)
```python
def get_stats() -> list:
...
return data_list
```
This function parses the JSON file received and scraps out the useful
data as a list of lists. Data scraped are language list, time spent on
each language, percentage of the time, start date, and end date. For
this action, I have limited the number of languages to 5 however it
should be very easy to increase that number.
- [Setting the
Timeline](https://github.com/avinal/Profile-Readme-WakaTime/blob/master/main.py#L13)
```python
def this_week(dates: list) -> str:
...
return f"Coding Activity During: {week_start.strftime('%d %B, %Y')} to {week_end.strftime('%d %B, %Y')}"
```
The start date and end date scraped in the last function are used here
to set the timeline. Because date in JSON is provided in UTC as below
:
```json
date: "YYYY-MM-DDTHH:MM:SSZ"
```
I striped it to simple dates only. We can set them manually by taking
the current time from the system. But that method is flawed. But this
method ensures that JSON was received latest and the request was
successful. Any anomaly will point to a failure in request.
- [Creating a bar
graph](https://github.com/avinal/Profile-Readme-WakaTime/blob/master/main.py#L21)
```python
def make_graph(data: list):
...
savefig(...)
```
Lastly, it is time to generate the graph and save them as an image.
This function uses the data scraped in the first step. Creating a bar
graph using matplotlib is easy.
Decorating was a bit difficult. I wanted this graph to merge with
GitHub's look so I chose to color the bar as GitHub colors the
languages. That data is stored as colors.json. Many of the languages have
slightly different spelling in GitHub as compared to WakaTime. So some
languages are shown in default color. That can be improved if we
notice that language and change its color manually. Lastly, the graph
is saved both as SVG and PNG. SVGs are better to put on a responsive
page.
2. [entrypoint.py](https://github.com/avinal/Profile-Readme-WakaTime/blob/master/entrypoint.sh)
shell script. This shell script clones the repository copies the
image and pushes changes to the master. There were several problems.
First of all authentication. This was solved by using a remote
repository address using GitHub Token. And it seems that GitHub
doesn't allow to commit without a username and email. So I used
**github-actions** bot email.
```bash
remote_repo-"https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "GitHub Actions"
```
`41898282` is the id assigned to the github-actions bot. Don't ask
where I found them 🙂.
Another problem was to separate repository name from combined
*username/repository-name* provided by `${GITHUB_REPOSITORY}`. GitHub doesn't
provides a direct way to get just the repo name. We used *Internal
Field Separator*. It returns an array and works similar to `split()`
command in Python and Java.
```bash
# '/' is the seperator
IFS-'/' read -ra reponame <<< "${GITHUB_REPOSITORY}"
# returned {username, repository}
repository-"${reponame[1]}"
```
After that, all other commands are pretty straight. Commit the added
files and push them.
3. [Dockerfile](https://github.com/avinal/Profile-Readme-WakaTime/blob/master/Dockerfile)
**IMPORTANT** It took a lot of time to reach this state 🥱. This is
where all the magic happens. I am running <span
class="title-ref">ubuntu:latest</span> inside the container. I first
update the distribution. Then install the required python packages.
Lastly, I invoke the python script and shell script.
There was an almost impossible problem, I searched hundreds of posts
that *how can I access the generated files inside Docker container*, but
no luck. But at last, I found a workaround(obviously otherwise you
wouldn't be reading this by now 🤣) each command is run in a separate
virtual sub-container. As the command ends its output is also lost but
not when you club multiple commands together. At least not until every
command is finished. The generated files are available to the next
clubbed process. I did that by combining the python script run and shell
script run.
```dockerfile
CMD python3 /main.py && /entrypoint.sh
```
This part is the smallest yet took the most time and tries while
developing this action.
## How to use this GitHub Actions?
1. First get your WakaTime API Key. You can get it from your
[WakaTime](<https://wakatime.com>) account settings.
2. Save WakaTime API Key to Repository Secret. Find that by clicking
the Settings tab. Keep the name of the secret as
**WAKATIME_API_KEY**.
3. Add the following line in your README.md of your repo.
```html
<img src="https://github.com/<username>/<repository-name>/blob/<branch-name>/images/stat.svg" alt="Alternative Text"/>
Example: <img src="https://github.com/avinal/avinal/blob/main/images/stat.svg" alt="Avinal WakaTime Activity"/>
```
> You can use this method to embed in web pages too. **Do not use the
> markdown method of inserting images. It does not work sometimes.**
4. Click the **Action** tab and **choose to set up a workflow
yourself**.
5. Copy the following code into the opened file, you can search for
**WakaTime Stat** in the marketplace tab for assistance.
```yaml
name: WakaTime status update
on:
schedule:
# Runs at 12 am '0 0 * * *' UTC
- cron: "1 0 * * *"
jobs:
update-readme:
name: Update the WakaTime Stat
runs-on: ubuntu-latest
steps:
# Use avinal/Profile-Readme-WakaTime@<latest-release-tag> for latest stable release
# Do not change the line below except the word master with tag number maybe
# If you have forked this project you can use <username>/Profile-Readme-WakaTime@master instead
- uses: avinal/Profile-Readme-WakaTime@master
with:
# WakaTime API key stored in secrets, do not directly paste it here
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
# Automatic github token
GITHUB_TOKEN: ${{ github.token }}
# Branch - newer GitHub repositories have "main" as default branch, change to main in that case, default is master
BRANCH: "master"
# Manual Commit messages - write your own messages here
COMMIT_MSG: "Automated Coding Activity Update :alien:"
```
6. Please wait till 12 AM UTC to run this workflow automatically. Or
you can force run it by going to the Actions tab. Or you can add the
following lines under `on:` to run with
every push. Search for 12 AM UTC to find the equivalent time in your
time zone.
```yaml
on:
push:
branches: [ master ]
schedule:
- cron: '1 0 * * *'
```
## My Coding Activity
![Avinal's GitHub stats](https://raw.githubusercontent.com/avinal/avinal/main/images/stat.svg)
-96
View File
@@ -1,96 +0,0 @@
---
category: development
date: 2020-12-31T19:07:00
description: It is real pain when you have small SSD and Windows Subsystem for Linux
(WSL) is growing exponentially in size. There is no easy way to move the WSL installation
to another drive. Here in this blog I will discuss how to tackle this problem with
bite size steps.
image: /images/windows-wsl2.webp
tags:
- wsl
- wsl2
title: Move WSL 2 Safely to another Drive
---
It is real pain when you have small SSD and Windows Subsystem for Linux
(WSL) is growing exponentially in size. There is no easy way to move the
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 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.
```powershell
PS C:\\Users\\Avinal> wsl -l -v
PS C:\\Users\\Avinal>
NAME STATE VERSION
* Ubuntu Running 2
Kali Stopped 2
```
3. If its running then you must stop the particular WSL distribution.
(*Ubuntu* used as example)
```powershell
PS C:\\Users\\Avinal> wsl -t Ubuntu
```
4. Export to some folder. (Here exporting *Ubuntu* as *ubuntu-ex.tar*
to *Z:wsl2*)
```powershell
PS C:\\Users\\Avinal> wsl --export Ubuntu "Z:\\export\\ubuntu-ex.tar"
```
5. Unregister previous WSL installation
```powershell
PS C:\\Users\\Avinal> wsl --unregister Ubuntu
```
6. Create a new folder and import your WSL installation to that folder.
```powershell
PS C:\\Users\\Avinal> New-Item -Path "Z:\\wsl2" -ItemType Directory
Directory: Z:\\
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 31-12-2020 21:03 wsl2
PS C:\\Users\\Avinal> wsl --import Ubuntu "Z:\\wsl2" "Z:\\export\\ubuntu-ex.tar"
```
7. Check after import is complete
```powershell
PS C:\\Users\\Avinal> wsl -l -v
PS C:\\Users\\Avinal>
NAME STATE VERSION
* Ubuntu Running 2
Kali Stopped 2
```
8. Mark one of your WSL distribution as *(default)*.
```powershell
PS C:\\Users\\Avinal> wsl -s Ubuntu
```
9. After exporting your default user will be set as
<i style="color:red">root</i> , to change it to your desired
username, run following command
```powershell
PS C:\\Users\\Avinal> ubuntu config --default-user user_name
```
10. Finally run `wsl` and you have successfully moved your WSL 2
installation to another drive.
## Attribution
- [Image](https://www.atwix.com/magento/magento-2-with-docker-for-windows-and-wsl-2/)
-832
View File
@@ -1,832 +0,0 @@
---
category: gsoc
date: 2021-08-19T23:07:00
description: This is the final report of my Google Summer of Code 2021 at The FOSSology
Project.
image: /images/gsoc-wall.webp
tags:
- gsoc
- FOSSology
title: GSoC'21 Final Evaluation Report
---
This is the final report of my Google Summer of Code 2021 at The FOSSology Project.
<style>
.rd {color:red;font-weight:bold}
.gr{color:green;font-weight:bold}
.or{color:orange;font-weight:medium}
ul{margin-bottom:0}
</style>
## The CMake Build system
FOSSology is quite an old and mature project. The project has been using
bare metal **Makefiles**. As the project is growing with new agents and
modernization it was required to have a modern build system.
The FOSSology is a suite of well-integrated and synchronized
sub-projects (called agents) written in C, C++, and PHP. Most of the
major agents are in C, C++ and that made CMake an obvious choice for a
new build system for FOSSology. CMake is a versatile set of build, test,
and packaging tools and is the most popular choice of C/C++ developers.
CMake can be extended to create a build system for other languages too
via custom scripts.
## GitHub Actions CI/CD
Since the FOSSology project moved on Github, it has used only the free
Travis CI service for OSS projects. At the time of writing Travis CI has
reduced its free tier CI services. GitHub Actions provides faster
builds. Since GitHub Actions is a fully managed service by GitHub, we
don't need to know how to scale and operate the infrastructure to run
it.
![A CI Meme:left](/images/ci.webp)
It is straightforward to use with GitHub because when we fork a
repository, the actions automatically get forked. This allows you to
test and build projects very efficiently and even run them closer to the
developer. Also, you have readily available access to the GitHub API,
making it more popular among developers.
## Improvements over previous build system and CI
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 :)
- 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
as fast as the previous one. With further improvement in
configuration, we will be able to further cut the build times.
- Previously FOSSology can only be built using *Unix Makefiles*. With
CMake, we can now use many other popular generators such as *Ninja*.
- Now it is also very flexible to choose different compilers. This will
help support more platforms and architecture in the future. As of now,
we are experimenting with Clang compilers.
- FOSSology is quite an old project and a lot of agent testing code was
written in the last decade. Initially, none of them were compatible
with the new build system, but we were able to hack most of the test
code using better-improved methods. Test times have also improved.
- Migrating from Travis CI to GitHub Actions was another big move and
for the most part, it removes the dependency on a third-party CI
service. Along with that GitHub Actions provides better build times,
tons of new features, and better integration with other GitHub
services.
## Deliverables
- 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
<table>
<colgroup>
<col style="width: 7%" />
<col style="width: 23%" />
<col style="width: 15%" />
<col style="width: 15%" />
<col style="width: 30%" />
<col style="width: 23%" />
<col style="width: 38%" />
</colgroup>
<thead>
<tr class="header">
<th>#</th>
<th>Agents</th>
<th>Build</th>
<th>Install</th>
<th>Testing</th>
<th>Packaging</th>
<th>Remarks</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>adj2nest</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="even">
<td>2</td>
<td>buckets</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td></td>
<td><blockquote>
<p><span class="gr">YES</span></p>
</blockquote></td>
<td></td>
</tr>
<tr class="odd">
<td>3</td>
<td>cli</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="rd">Functional</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="even">
<td>4</td>
<td>copyright</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
<li><span class="gr">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="odd">
<td>5</td>
<td>debug</td>
<td></td>
<td><span class="gr">YES</span></td>
<td></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="even">
<td>6</td>
<td>decider</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
<li><span class="gr">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="odd">
<td>7</td>
<td>deciderjob</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="even">
<td>8</td>
<td>delagent</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="rd">Functional</span></li>
<li><span class="rd">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="odd">
<td>9</td>
<td>demomod</td>
<td><span class="or">YES</span></td>
<td><span class="or">YES</span></td>
<td><ul>
<li><span class="or">Functional</span></li>
<li><span class="or">Unit</span></li>
</ul></td>
<td><span class="or">NO</span></td>
<td><em>(Not Used)</em></td>
</tr>
<tr class="even">
<td>10</td>
<td>example_wc_agent</td>
<td><span class="or">YES</span></td>
<td><span class="or">YES</span></td>
<td><ul>
<li><span class="or">Functional</span></li>
<li><span class="or">Unit</span></li>
</ul></td>
<td><blockquote>
<p><span class="or">NO</span></p>
</blockquote></td>
<td><em>(Not Used)</em></td>
</tr>
<tr class="odd">
<td>11</td>
<td>clib</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
<li><span class="gr">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="even">
<td>12</td>
<td>cpplib</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="odd">
<td>13</td>
<td>phplib</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
<li><span class="gr">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td>1 functional test needs fix</td>
</tr>
<tr class="even">
<td>14</td>
<td>maintagent</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="odd">
<td>15</td>
<td>mimetype</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
<li><span class="gr">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="even">
<td>16</td>
<td>monk</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
<li><span class="gr">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="odd">
<td>17</td>
<td>ninka</td>
<td><span class="or">YES</span></td>
<td><span class="or">YES</span></td>
<td><ul>
<li><span class="or">Functional</span></li>
<li><span class="or">Unit</span></li>
</ul></td>
<td><span class="or">NO</span></td>
<td><em>(Deprecated)</em></td>
</tr>
<tr class="even">
<td>18</td>
<td>nomos</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
<li><span class="gr">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="odd">
<td>19</td>
<td>ojo</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
<li><span class="gr">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td>1 functional test needs fix</td>
</tr>
<tr class="even">
<td>20</td>
<td>pkgagent</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
<li><span class="gr">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="odd">
<td>21</td>
<td>readmeoss</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="even">
<td>22</td>
<td>regexscan</td>
<td><span class="or">YES</span></td>
<td><span class="or">YES</span></td>
<td></td>
<td><blockquote>
<p><span class="or">NO</span></p>
</blockquote></td>
<td><em>(Deprecated)</em></td>
</tr>
<tr class="odd">
<td>23</td>
<td>reportImport</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="even">
<td>24</td>
<td>reuser</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="odd">
<td>25</td>
<td>reso</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="even">
<td>26</td>
<td>scheduler</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="rd">Functional</span></li>
<li><span class="rd">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td>Tests needs fix</td>
</tr>
<tr class="odd">
<td>27</td>
<td>softwareHeritage</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="even">
<td>28</td>
<td>spasht</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="odd">
<td>29</td>
<td>spdx2</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
<li><span class="gr">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td>1 Test failing in CI</td>
</tr>
<tr class="even">
<td>30</td>
<td>unifiedreport</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="odd">
<td>31</td>
<td>ununpack</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
<li><span class="rd">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td>Unit tests needs fix</td>
</tr>
<tr class="even">
<td>32</td>
<td>wget_agent</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="gr">Functional</span></li>
<li><span class="gr">Unit</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
<tr class="odd">
<td>32</td>
<td>www</td>
<td><span class="gr">YES</span></td>
<td><span class="gr">YES</span></td>
<td><ul>
<li><span class="rd">UI</span></li>
</ul></td>
<td><span class="gr">YES</span></td>
<td></td>
</tr>
</tbody>
</table>
### GitHub Actions CI Tasks
| # | CI Tasks | Status |
|-----|-----------------------------------------|----------------------------------------------------------|
| 1 | <span class="gr">build</span> | Added Ubuntu 20.04 GCC 8, 9 and Clang, GCC 7 not working |
| 2 | <span class="gr">c/cpp unit test</span> | Added, delagent, scheduler and ununpack not working |
| 3 | <span class="gr">phpunit tests</span> | Added, delagent and scheduler functional not working |
| 4 | <span class="rd">cahching</span> | Not implemented |
| 5 | <span class="rd">source install</span> | Not implemented |
(<span class="gr">GREEN</span>: COMPLETED, <span class="rd">RED</span>:
INCOMPLETE, <span class="or">ORANGE</span>: NOT NEEDED/DEPRECATED)
## How does it work and how to use it?
The new build system retains the modular and hierarchical structure of
the previous build system. On the other hand, the new build system
provides several new flags to control the build. The new build system
forces out-of-source build instead of the previous in-source builds.
This keeps the source clutter-free and reduces the chance of
accidentally deleting source files. *Testing still needs some in-source
artifacts, this will be solved once all the tests are fixed according to
the new build system.*
Each agent is a complete CMake sub-project with its independent
configuration for building, installing, and testing. That means a single
agent can be built and installed separately and even removed from the
default build without breaking other builds. The directory structure is
as below.
```bash
.
├── build # temporary directory for build artifacts
├── cmake # CMake modules for FOSSology
│ ├── FoPackaging.cmake # CMake Packaging configurations
│ ├── FoUtilities.cmake # Custom CMake utilities
│ ├── FoVersionFile.cmake # VERSION version.php CMake template file
│ ├── SetDefaults.cmake # CMake defaults for this project
│ ├── TestInstall.make.in # Template makefile for install during tests
│ └── VERSION.in # VERSION file template
├── src
│ ├── agent-1 # Agent sub-project
│ │ ├── agent # Agent's source code directory
│ │ │ ├── agent-source-code
│ │ │ └── CMakeLists.txt
│ │ ├── agent_tests # Agent's test directory
│ │ │ ├── Unit
│ │ │ ├── Functional
│ │ │ └── CMakeLists.txt
│ │ ├── ui # Agent's UI source code
│ │ │ ├── templates
│ │ │ └── agent-ui-code
│ │ └── CMakeLists.txt # Agent's top-level CMake configuration
: :
│ ├── other agents
: :
│ └── CMakeLists.txt # Source intermediate CMake configuration
:
├── other directories and files
:
└── CMakeLists.txt # FOSSology Top-level CMake configuration
```
The `cmake` directory contains customized CMake modules and templates
for FOSSology. This directory is required for all the operations. The
general workflow of the new build system as well as how to use it is
described below.
1. Since the new build system is still in review. You must fork
FOSSology and pull the
[#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
```
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
```
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> ..
```
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>
```
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
```
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
directory only. You can choose to configure a single agent if you
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
```
7. You can package FOSSology, the packaging currently lacks copyright
and conf files. But for testing purposes, you can use the following
commands. Similar to installing, if you run the package command
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
```
## Known Issues and Drawbacks
Although the transition from Makefiles to CMake and Travis CI to GitHub
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.
![A Bug Meme:right](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
developer to set the install prefix manually before packaging to
produce packages with the correct directory structure.
- Testing and packaging must be used from the FOSSology root directory.
Not doing so may or may not configure the project as intended.
- Previously tests were written hardcoded for the Makefiles. But new
build system requires all artifacts to be generated in a separate
directory. This required me to add symbolic links wherever a generated
script or file is expected. Tests can still leave some artifacts
inside source folders.
- There is no easy way to install a particular agent from the FOSSology
root directory.
- Packages don't contain copyright, readme, and license files. CMake
doesn't provide a way to include these files. This is being tracked by
issue
[#21832](https://gitlab.kitware.com/cmake/cmake/-/issues/21832).
- While packaging the symbolic links may or may not be dereferenced and
hence results in copying the folder too in the target directory.
- Running tests locally may require switching to `fossy` user.
- While configured for testing, it may give permission errors.
- Scheduler, Ununpack, and Delagent unit and functional tests are not
working. I have added an issue
[#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).
This will be later added to the FOSSology.
## Challenges Faced
While this whole project was challenging, some aspects of it were
unforeseen and more challenging. When I decided to go on with this
project I just had enough CMake knowledge to write a configuration for a
very small project. I had never used CMake on this big scale. On the
other side, the FOSSology community is largely unknown to CMake so for
all of us it was learned, practiced, and implement. With support from
mentors, I was able to overcome this challenge with flying colors.
The other challenge was to understand the old build system, how they are
all connected and what is the flow. The complexity can be imagined by
the fact that the most of code and configurations were written in the
decade before the last decade and haven't changed much since then.
The most challenging task was to make tests work with the new build
system. Since tests were mostly hardcoded and the new build system
refactored many of the files and directory, the tests were failing
initially. The testing part took me the most time. All thanks to my
mentor Gaurav, I was able to hack them to suit the
new build system.
## Related Resources and Links
- Fix FOSSology agent tests issue
[#2084](https://github.com/fossology/fossology/issues/2084)
- feat(CI): Migrate API docs generation and deployment to GitHub Actions
pull request
[#1917](https://github.com/fossology/fossology/pull/1917)
- feat(CI): Migrate Static Checks and Analysis to GitHub Actions from
Travis CI [#1919](https://github.com/fossology/fossology/pull/1919)
## Future Development Plans
There is a lot to do with the new build system and CI and it will
probably take a year or to reach a maturity point. I was able to meet
most of the goals but some of them are remaining.
- Fix the tests, probably renovate them from the ground up.
- Find a hack for packaging problems.
- Improve and optimize the build.
- Modernise the source code, remove old, bloated code and replace them
according to new standards.
## What did I learn from this project?
This Google Summer of Code was the busiest time of my life for all good
reasons. I learned a lot about license compliance and how it all works
in the software industry. The next big thing is CMake. As I mentioned I
was just a novice user of CMake. Now I am confident that given any other
large project I will be able to migrate it/improve it. I got to learn
PHP, of which I did not know a single word before GSoC. And finally, I
learned about packing and testing. I had these courses but implementing
them myself and fixing them was a wholesome experience.
Other than that I improved on my communication and presentation skills.
Collaborating with fellow participants was one of the great things that
happened during GSoC.
## Acknowledgments
Google Summer of Code is the best thing that has happened to me this
year so far. Although there are numerous people to say thanks to, I want
to mention key people who were my motivation and support during this
period.
First of all, I want to thank and appreciate my mentors [Gaurav
Mishra](https://github.com/GMishx), [Michael C.
Jaeger](https://github.com/mcjaeger), [Anupam
Ghosh](https://github.com/ag4ums), and [Shaheem Azmal M
MD](https://github.com/shaheemazmalmmd). Without the help and support
from them, all this would not have been possible. They are very polite,
knowledgeable, and helpful.
Finally, I want to thank, my family and friends. I got to meet many
awesome developers as my fellow participants from around the world, I
wish we will do more collaboration in the future.
@@ -1,71 +0,0 @@
---
category: gsoc
date: 2021-07-14T12:29:00
description: In the first phase of GSoC 2021 @ The FOSSology Project, I have completed
the desired milestone. As of now, FOSSology can be installed completely via CMake
and most of the components are working fine in initial testing.
image: /images/tech-wallpaper.webp
tags:
- gsoc
- FOSSology
title: GSoC'21 First Evaluation Report
---
In the first phase of GSoC 2021 @ The FOSSology Project, I have
completed the desired milestone. As of now, FOSSology can be installed
completely via CMake and most of the components are working fine in
initial testing.
## Updates
In the first phase of GSoC 2021 @ The FOSSology Project, I have
completed the desired milestone. As of now, FOSSology can be installed
completely via CMake and most of the components are working fine in
initial testing.
List of tasks completed
- Added CMake build configurations for all the C/C++ agents for
executables, libraries, and coverages
- Added CMake install configuration for all C/C++ and PHP agents as well
as extra components
- Reworked the shell scripts and generated source files to make them
more compatible with CMake as well as better in terms of overall
compatibility with the latest tools.
## Improvements
- The new CMake build architecture is much more flexible to changes as
compared to hard-coded Makefiles.
- CMake generated configurations support parallel build by default, this
has led to significant improvement in build time. CMake generated
configuration can now build the whole project within 2 mins or even
faster on more powerful CPUs (Both Ninja and Makefiles with the same
number of parallel processes) compared to 4-5 minutes previously.
*(These results are averaged from initial testing of new build
architecture)*
- CMake supports out-source builds by default, which means the source
folders are not touched/modified while building, all build files and
residuals get their separate folder and the source tree can be cleaned
easily.
- Developers can now opt for a long list of generators to build
FOSSology e.g Makefiles, Ninja as per their needs.
## How to test
Instructions to test the new Build system is in [this](https://github.com/avinal/fossology/wiki#test-the-new-system-only-gcc-with-make-and-ninja-tested-for-now) wiki.
## Known Issues
- There may be a permission issue with some generated sources while
building. This can be bypassed for now by running
`sudo chmod +x <filename>` command.
- Coverage builds may fail.
## Postponed Tasks
- configuration for tests are skipped for now
## Work in Progress
- Currently, I am working on packaging the FOSSology with CMake.
-49
View File
@@ -1,49 +0,0 @@
---
category: gsoc
date: 2021-05-28T21:00:00
description: This meeting is the first of the recurring weekly GSoC project meetings.
In this meeting the current status of progress according to the proposal was discussed
and some topics related to current build system based on Make and the new build
system based on CMake.
image: /images/tech-wallpaper-1.webp
tags:
- gsoc
- fossology
title: Community Bonding Meeting 0
---
This meeting is the first of the recurring weekly GSoC project meetings. In this meeting the current status of progress according to the proposal was discussed and some topics related to current build system based on Make and the new build system based on CMake.
## Discussions
- **The current progress according to schedule**
- The blog on CMake is on the way.
- I have gone through the Makefiles to get a rough estimate of the
work.
- Published the GSoC project blog
- **How are agents related to each other in terms of compilation?**
- Each agent is independently compiled and generally use the source
code in `lib` folder. If any agent needs other agent then it uses
the library files instead.
- **Does every agent have a executable and library?**
- Not necessarily, there are agents written in C, C++ and PHP,
depending on what is the use the configuration can be different.
## Conclusion and Further Plans
- It would be better if I get started by creating CMake configuration
for any of the agent.
- Fork and create a branch for development and mention the same in blog
or wiki.
- Add a timeline section in blog or wiki as provided in the project
proposal.
- Publish the CMake introductory blog.
- Prepare a prototype/plan for next week.
- Find out the best alternative for handling the global variables.
## Attendees
- [Gaurav Mishra](https://github.com/GMishx)
- [Anupam Ghosh](https://github.com/ag4ums)
- [Ayush Bhardwaj](https://github.com/hastagAB)
- [Avinal Kumar](https://github.com/avinal)
-41
View File
@@ -1,41 +0,0 @@
---
category: gsoc
date: 2021-06-04T22:30:00
description: In this second meeting points over default Makefiles were discussed.
Ninja can be used as an alternative for Makefiles.
image: /images/tech-wallpaper-2.webp
tags:
- gsoc
- fossology
title: Community Bonding Meeting 1
---
In this second meeting points over default Makefiles were discussed. Ninja can be used as an alternative for Makefiles.
## Discussions
- **What is the use of** `Makefile.deps` **and** `Makefile.process`
**files?**
- `Makefile.deps` consists of many used and unused snippets. These
snippets help setup the build and test environment for fossology.
Since there are many directories that are hardcoded, special care is
required while replacing this file.
- `Makefile.process` generates a master variable from list of
variables. It assists the script in `Makefile.conf` file. These
files together generate a list of variables that can be used
throughout the build process.
- The build can be made faster using **Ninja** instead of **Make**.
- Ninja supports parallel builds by default.
- Print the flags used once the CMake configuration is working. That
will help us debug the process.
## Conclusion and Further Plans
- Write a *CMakeLists.txt* for **lib**.
- Push the working branch and update the link either on wiki or blog.
## Attendees
- [Gaurav Mishra](https://github.com/GMishx)
- [Anupam Ghosh](https://github.com/ag4ums)
- [Avinal Kumar](https://github.com/avinal)
-100
View File
@@ -1,100 +0,0 @@
---
category: gsoc
date: 2021-08-06T22:47:00
description: This week I worked on CMake testing configuration. Most of the time was
spent understanding the previous testing architecture.
image: /images/tech-wallpaper-11.webp
tags:
- gsoc
- FOSSology
title: Coding Week 9 Meeting
---
This week I worked on CMake testing configuration. Most of the time was spent understanding the previous testing architecture.
## Week 9 Progress
> Initial CMake testing configuration added.
>
> - Few tests working, e.g copyright, nomos
> - Improved packaging configurations
> - To test the current progress, follow the instructions [here](https://github.com/avinal/FOSSology/wiki#test-the-new-system-only-gcc-with-make-and-ninja-tested-for-now)
## Discussions
- **Is this a necessity that tests must be run as the fossy user?
Because when I run tests as me they as for permissions. But proceeds
as the fossy user.**
- No this is not required and this should not happen. They run under
fossy as they sometimes require writing into /srv/fossology. But if
they can run under other users that is an enhancement.
- **I am getting a lot of install issues in C/C++ agent tests?**
``` bash
Start 3: delagent_unit_test
3: Test command: /home/avinal/Documents/my_git/fossology/build/src/delagent/agent_tests/test_delagent
3: Test timeout computed to be: 10000000
3: install: cannot stat '/home/avinal/Documents/my_git/fossology/build/src/delagent/agent_tests/..//../../install/defconf/Db.conf': No such file or directory
3: install: cannot stat '/home/avinal/Documents/my_git/fossology/build/src/delagent/agent_tests/..//VERSION': No such file or directory
3: sh: 1: ../../../testing/db/createTestDB.php: not found
3: Failed to run ../../../testing/db/createTestDB.php -c /home/avinal/Documents/my_git/fossologbuild/src/delagent/agent_tests/testconf -e, exit code is:127 .
3/8 Test #3: delagent_unit_test ...............***Failed 0.02 sec
```
- Not sure about the reason. I was suspecting Makefile but since they
are gone now, I think PHP files are calling some shell commands
causing this.
- **Suggestions/Changes from Gaurav for fixing tests.**
- For clib-tests, it needs to be called from PHP file (via PHPUnit) as
it requires setting up a dummy repo. Check the
`src/lib/c/test/Makefile`
- For missing services.xml, the test cases include
`src/lib/php/common-container.php` which loads the file. It expects
it to be in current dir. Can be solved in two ways
- Create another common-container.php just for test cases with
correct paths.
- Edit the current file and take the help of environment variables.
For example, if a test variable is exported in env, find the XML
relative to it otherwise continue as normal and this variable can
be exported by CMake during the test.
- Scheduler tests do need `fossology_testconfig` from Makefile.deps
which set up the srv and create test configurations, DB, etc.
- Another shell script can be written to do all that and call it
from CMake. The PHP file called makes everything required in /tmp
so not an issue.
- The locations like `LOG_DIR, FOSSDB_CONF`, etc. in CMakeLists.txt
can be changed to some other values. I am guessing this is the
reason you were asked for the fossy password.
- File `src/copyright/agent_tests/Functional/cli_test.sh` needs to be
edited to take paths relative to build dir. It can also be made into
a .in file which is generated from CMake? So every path can easily
be updated.
- For PHP agents with missing version.php issue, there is a hack
possible
- Check
<https://www.php.net/manual/en/function.set-include-path.php>
- Another hack will be to use soft links for version.php in the
source.
- Other PHP issues like
`PHP Fatal error: Uncaught Error: Class 'Fossology\Lib\Agent\Agent' not found`
can only be solved by editing composer.json before doing composer
install (look for autoload: psr-4 ).
- For delagent, pkgagent, mimetype issues, something can be done here:
<https://github.com/avinal/fossology/blob/avinal/feat/testing/src/testing/db/c/libfodbreposysconf.c#L349>
## Conclusion and Further Plans
- Raise a pull request for all the progress till now.
- Refactor the test source code according to suggestions.
- Implement remaining testing configurations.
## Attendees
- [Gaurav Mishra](https://github.com/GMishx)
- [Anupam Ghosh](https://github.com/ag4ums)
- [Avinal Kumar](https://github.com/avinal)
-79
View File
@@ -1,79 +0,0 @@
---
category: gsoc
date: 2021-08-14T22:47:00
description: This week I implemented CMake testing configuration and fixed most of
the tests. As of now all but 5 tests are working fine.
image: /images/tech-wallpaper-12.webp
tags:
- gsoc
- FOSSology
title: Coding Week 10 Meeting
---
This week I implemented CMake testing configuration and fixed most of the tests. As of now all but 5 tests are working fine.
## Week 9 Progress
> Testing configuration for all agents added
>
> - GitHub Actions Configuration added
> - Fixed and refactored most of the tests
> - Raised a pull request for all the works till now. [#2075](https://github.com/fossology/fossology/pull/2075)
> - To test the current progress, follow the instructions [here](https://github.com/avinal/FOSSology/wiki#test-the-new-system-only-gcc-with-make-and-ninja-tested-for-now)
## Discussions
- **I suspect that the Ojo regression test's expected data file is
outdated**
- Michael said that on their internal Jenkins CI, these tests are not
being run currently, so this might be possible that the file is
outdated.
- **Since some of the tests need Makefile to install while testing,
CMake generated Makefiles and test Makefiles are conflicting, and
hence we are forced to use Ninja for testing. What can I do about
it?**
- Michael suggested using `--file=filename` flag with the make command
and change the name of the test Makefile to something else. This
will solve the problem.
- **Mimetype is detecting executables as shared lib, is that expected or
needs to be fixed?**
- Mimetype internally depends on the *file* command to get the
mime-type. If the output of the *file* command is also the same then
it is okay.
- **What is** `folderlist` **in
<https://github.com/fossology/fossology/blob/master/src/delagent/agent_tests/Functional/ft_cliDelagentTest.php#L126>
?**
- `folderlist` is a view. Use `createViews()` function.
- **Suggestions/Changes from Gaurav for fixing phpunit tests.**
- Please note the changes in `setUp()` function in
`src/lib/php/tests/test_common_license_file.php`
- The test database name is given to the constructor of TestPgDb and
can be anything as it gets deleted in `teardown()`
- The `dbmanager` is provided by the object, no need to initialize
global `PG_CONN` (it will be exposed by the library in case some of
the functions need it).
- All the tables needs to be explicitly mentioned to
`createPlainTables()` and their corresponding `createSequences()`
(you can get them using `\d tablename` from existing DB easily. Then
call the `alterTables()` to update the sequence. (I am not sure if
`createConstraints()` is required at all, try to remove)
- `tearDown()` is pretty easy, just need to call `fullDestruct()`. For
debugging, you can add `exit(-1);` after any line you as suspecting,
connect to DB and checkout the database, select/inspect tables.
- There is also `TestInstaller` class in case any of test case needs
the whole mods-enabled with fossology.conf, VERSION, etc. Please
check `src/cli/tests/test_fo_copyright_list.php` for quick
reference.
## Conclusion and Further Plans
- Fix the remaining tests.
- Add week 8, 9 reports.
- Add Final Evaluation Report.
- Complete Final Evaluation.
## Attendees
- [Michael C. Jaeger](https://github.com/mcjaeger)
- [Anupam Ghosh](https://github.com/ag4ums)
- [Avinal Kumar](https://github.com/avinal)
-91
View File
@@ -1,91 +0,0 @@
---
category: gsoc
date: 2021-06-11T23:30:40
description: In this third meeting, I demoed the working build system, currently building
executables and libraries, a lot of queries were resolved about writing version
files and attaching commits and hashes to the build.
image: /images/tech-wallpaper-3.webp
tags:
- gsoc
- FOSSology
title: Coding Week 1 Meeting
---
In this third meeting, I demoed the working build system, currently building executables and libraries, a lot of queries were resolved about writing version files and attaching commits and hashes to the build.
## Week 1 Progress
> This week was mainly focused on analyzing the previous build system and framing a skeleton for the new build system.
>
> - Created the build configuration [analysis table](https://github.com/avinal/FOSSology/wiki/agents-spec#agents-configuration-list).
> - Completed the basic skeleton.
> - Completed the CMake configuration for libraries
> - To test the current progress, follow the instructions [here](https://github.com/avinal/FOSSology/wiki#test-the-new-system-only-gcc-with-make-and-ninja-tested-for-now)
> - Test on [GitPod](https://gitpod.io/#https://github.com/avinal/FOSSology/tree/avinal/feat/cmake-buildsystem) right inside your browser.
## Discussions
- **What are the flags needed for C and C++?**
- The `-g` flag enables debug.
- The `-O2` flag is used for optimizing.
- In FOSSology these two flags are used together by default for all
build purposes because it is desired to have an optimized binary but
some level of debugging information is also desired.
- **The Makefiles have some compile-time preprocessor macro definitions
that need to be passed to each build.** The Makefiles have all the
path values passed as `'"..value.."'` format *(double quote inside
single quotes)*, however the commands produced by CMake have
`\"..value..\"` format *(escaped double quotes)*. Are they the same or
it needs to be changed?
- Currently, there is nothing to determine if they work the same or
not, but if the compiler would not have accepted them then, it would
have thrown an error. As long it is working these should be fine,
but will need to be checked in the final build.
- **Are all libraries in FOSSology static?**
- No, by default no library is static. The format
`lib<library-name>.a` is confusing but no need to worry about it for
now, if this is working fine then no problem.
- In general, this format denotes a static library.
- **How to add the version and commit information to the builds?**
- I have gone through [this
thread](https://cmake.org/pipermail/cmake/2018-October/068383.html)
on CMake's official mailing list. And they have suggested a lot of
options, but unable to decide which option to use. Gaurav said he
will see into this thread and for now, I should try writing a shell
script and test if that works.
- Same can be tested for the version too.
- **What is** `_squareVisitor.h.pre` **used for?**
- They are used to generate source code at build time.
- **Is there any inheritance structure in the build system?**
*(Michael)*
- For now, I am writing separate modules for the default operations
needed in most configurations. The final structure will be decided
in the final build.
- **Where are all the binaries produced?** *(Gaurav)*
- They are located in the build folder with the same directory
structure as the original project.
- While installing the same will be used and none of the source
folders are ever disturbed.
- **Are all flags taken from the Makefiles itself?** *(Anupam)*
- Yes and No, there are some flags that CMake uses by default, they
can be altered by changing the value for `CMAKE_C_FLAGS` and
`CMAKE_CXX_FLAGS`. One can also append their flags. Since not all
compilation requires all the flags, I have taken the default one
into cache variables, and others are appended while configuring for
a particular project.
## Conclusion and Further Plans
- Try the `monkbulk` in monk and `makefile.sa` in nomos.
- Try adding the version and commit hash info.
- Implement writing version files for each build.
- Add proper comments in the `CMakeLists.txt` files.
## Attendees
- [Michael C. Jaeger](https://github.com/mcjaeger)
- [Shaheem Azmal M MD](https://github.com/shaheemazmalmmd)
- [Gaurav Mishra](https://github.com/GMishx)
- [Anupam Ghosh](https://github.com/ag4ums)
- [Ayush Bhardwaj](https://github.com/hastagAB)
- [Avinal Kumar](https://github.com/avinal)
-64
View File
@@ -1,64 +0,0 @@
---
category: gsoc
date: 2021-06-18T23:30:00
description: In this fourth meeting, a lot of questions were discussed related to
the existing build system and what things we have to drop or modify.
image: /images/tech-wallpaper-4.webp
tags:
- gsoc
- FOSSology
title: Coding Week 2 Meeting
---
In this fourth meeting, a lot of questions were discussed related to the existing build system and what things we have to drop or modify.
## Week 2 Progress
> This week was mainly focused on creating CMake configuration for libraries, executables and coverage.
>
> - Added the configuration for libraries and executables
> - Resolved parallel build problems with coverage configs
> - Implemented generated source configurations
> - To test the current progress, follow the instructions [here](https://github.com/avinal/FOSSology/wiki#test-the-new-system-only-gcc-with-make-and-ninja-tested-for-now)
## Discussions
- **Should I generalize the coverage build for each agent?**
- Coverage depends on the agent_tests and may or may not be available
for all the agent. So follow the Makefiles and add the configuration
as it is in them.
- Leave coverage for them who don't have it already in their
Makefiles.
- **What are :code:\`\$(AGENTLIB) \$(REPO) \$(DB)\` in the Makefiles?**
- They seems to be remains of previous build configuration. Until
there is a problem, ignore if you can not find the definitions.
- **Can I refactor the directory structure of nomos and monk, it will
help keep the source code generation out of source directory?**
- Yeah, sure. As long as it does not affects the working of the
project you may refactor them to suit your needs.
- **I am facing problems with due to headers included using angled
brackets, can I change them to double quotes instead?**
- Yeah that would be okay, anyway the general practice is to add user
header files using double quotes.
- **Using -Werror flag in regexscan causes build to fail, should I
remove it?**
- Since `regexscan` is not the part of default build you can ignore
it.
- **In scheduler source code the preprocessor macro value for
FOSSDB_CONF is different from that in lib, is that correct?**
- We have made some changes, please change it to the same as in lib.
## Conclusion and Further Plans
- Try adding the version and commit hash info.
- Implement writing version files for each build.
- Add proper comments in the `CMakeLists.txt` files.
- Complete the coverage build configuration
- Start implementing the install configurations
## Attendees
- [Michael C. Jaeger](https://github.com/mcjaeger)
- [Shaheem Azmal M MD](https://github.com/shaheemazmalmmd)
- [Gaurav Mishra](https://github.com/GMishx)
- [Avinal Kumar](https://github.com/avinal)
-66
View File
@@ -1,66 +0,0 @@
---
category: gsoc
date: 2021-06-22T23:22:00
description: In this fifth meeting, question related to versioning and obtaining commit
hash were discussed, this was a short meeting.
image: /images/tech-wallpaper-5.webp
tags:
- gsoc
- FOSSology
title: Coding Week 3 Meeting
---
In this fifth meeting, question related to versioning and obtaining commit hash were discussed, this was a short meeting.
## Week 3 Progress
> Version file Implementation
>
> - Initial functions on obtaining commit and branch info
> - To test the current progress, follow the instructions [here](https://github.com/avinal/FOSSology/wiki#test-the-new-system-only-gcc-with-make-and-ninja-tested-for-now)
## Discussions
- **What is the regex expression used for obtaining version
information?**
- The regex has recently been modified to cover recent versions. The
latest form is as below:
``` cpp
([[:digit:]]+.[[:digit:]]+.[[:digit:]]+)(-?rc[[:digit:]]+)?-?([[:digit:]]*)-?[[:alnum:]]*
```
- You can also try alternatives to regex if possible for CMake.
- **Should I use** `git describe --tags` **or**
`git describe --always HEAD` **for obtaining version information?**
- In FOSSology we always use `git describe --tags`, no exception
whatsoever.
- CMake provides a preset configuration for the install path on GNU
systems, you can see the description
[here](https://cmake.org/cmake/help/v3.10/module/GNUInstallDirs.html)
based on the
[configuration](https://www.gnu.org/prep/standards/html_node/Directory-Variables.html)
suggested by the GNU After comparing the variables defined in
Makefile.conf with these, it seems directly taken from GNU standards.
So I wanted to ask if this would be okay to stick to the presets,
instead of manually declaring the same paths? The former step will
reduce the number of variables we are currently caching and will make
it flexible for different installation scenarios.
- Using the GNU standards is the ideal situation but FOSSology uses
slightly different locations. For example, all agents end up under
`/usr/local/share/fossology/` with their individual folders instead
of going to `/usr/local/bin/`.
- If the same results can be achieved by using the
`CMAKE_INSTALL_<dir>` and `CMAKE_INSTALL_PREFIX` then yeah, it will
be preferred.
## Conclusion and Further Plans
- Try adding the version and commit hash info.
- Implement writing version files for each build.
## Attendees
- [Michael C. Jaeger](https://github.com/mcjaeger)
- [Gaurav Mishra](https://github.com/GMishx)
- [Avinal Kumar](https://github.com/avinal)
-83
View File
@@ -1,83 +0,0 @@
---
category: gsoc
date: 2021-06-29T23:22:00
description: In this seventh meeting question related to installing the FOSSology
were discussed.
image: /images/tech-wallpaper-6.webp
tags:
- gsoc
- FOSSology
title: Coding Week 4 Meeting-1
---
In this seventh meeting question related to installing the FOSSology were discussed.
## Week 4 Progress
> CMake configuration files have been refactored to make each agent as a separate sub-project.
>
> - Symbolic links are installing.
> - VERSION files can be generated now during configure step
> - To test the current progress, follow the instructions [here](https://github.com/avinal/FOSSology/wiki#test-the-new-system-only-gcc-with-make-and-ninja-tested-for-now)
## Discussions
- **There are two types of replacements CMake can configure file with.**
`@VARIABLE@` **and** `${VARIABLE}` **. Since in PHP** `$variable` **is
used, it may create problem for CMake replacements. So may I replace
them?**
- Yeah sure, go ahead. It will be more robust.
- The replacement of `$VARIABLE` can be stopped by using `@ONLY`
option in `configure_file(...)` command.
- **How to generate vendor directory?**
- The code for generating vendor directory is in `src/Makefile`.
- Before executing code for the generation, make sure to copy
`composer.json` and `composer.lock` to the target directory.
- There is also a patch that FOSSology needs to function as intended.
Make sure to run that patch to check and apply.
- For now, we generate *vendor* while building, but it would be nice
if it can be generated in the build step.
- **Currently I am generating the VERSION file in configure step itself.
Should I move it to the build or install step?**
- Yeah, please move it to the build step. As in configure step the
data might be outdated.
- **Is there any configuration for Release that we can use to install or
test?** *(Michael)*
- Yeah, there are 4 inbuilt configurations for various levels of
optimization and can be applied to tests and installation.
- **Is the VERSION file is generated for each agent or whole project at
once? Because in the latter case, the VERSION file can be generated as
the last step.**
- No agent has a VERSION file along with the main VERSION file for
FOSSology.
- **How I can build and install a single agent or component?**
- There are two ways you can build and install a specific agent or
component only.
- The first one is quite simple. Just change your directory to the
specific agent's directory and run all the usual commands for
building and installing.
- The second one is a bit for typing work. This can be used directly
from the top-level directory. After configuring the CMake, you can
run the following command to install the specific component.
``` bash
# for Unix Makefiles
make list_install_component # this will list all the available components
cmake -DCOMPONENT=<component-name> -P cmake_install.cmake
```
- I am writing a macro that will let us install a component by simply
running `make install component`.
## Conclusion and Further Plans
- Implement generation of vendor directory.
- Move VERSION file generation to build step.
## Attendees
- [Michael C. Jaeger](https://github.com/mcjaeger)
- [Gaurav Mishra](https://github.com/GMishx)
- [Avinal Kumar](https://github.com/avinal)
-59
View File
@@ -1,59 +0,0 @@
---
category: gsoc
date: 2021-07-02T22:22:00
description: In this eighth meeting questions related to post install generation were
asked. This was a short meeting.
image: /images/tech-wallpaper-7.webp
tags:
- gsoc
- FOSSology
title: Coding Week 4 Meeting-2
---
In this eighth meeting questions related to post install generation were asked. This was a short meeting.
## Week 4 Progress
> Version parsing logic implemented.
>
> - VERSION and COMMIT_HASH added to every executables.
> - Installing part is complete except `cli`.
> - Symbolic Links are installing and working fine.
> - Version, Symbolic Links, `VERSION` file generation, `version.php` generation are now more modular and called via a single function for each agent
> - Most dependencies are now moved to single configuration file.
> - Vendor directory generation and installing are now working.
> - To test the current progress, follow the instructions [here](https://github.com/avinal/FOSSology/wiki#test-the-new-system-only-gcc-with-make-and-ninja-tested-for-now)
## Discussions
- **Why all the symbolic links in cli points to** `fo_wrapper`
**script?**
- The `fo_wrapper` script calls the PHP script on the symbolic link
that called the fo_wrapper. It also initializes any requirement
before calling the scripts.
- **How to generate all the other configuration in**
`/usr/local/etc/fossology` **directory?**
- You can find the input files for all these configurations in the
`install/defcon` directory.
- **What are** `OBSOLETEFILES` **in** `www/ui/Makefile` **?**
- They are kept for compatibility purposes. Although they have been
removed in the current versions of FOSSology, if a user installs a
new version on top of an older instance, then we should explicitly
remove those files.
- **I have created a separate folder for generating vendor directory. Is
that okay?**
- Yeah, it should be fine, But it would be better to rename it to
something else. Or even better if moved to *www* itself. Since these
files are used by www.
## Conclusion and Further Plans
- Move `vendor` scripts to `www` directory.
- Implement installing for FOSSology cli.
- Implement installing configuration scripts.
- Finish installation for testing
## Attendees
- [Gaurav Mishra](https://github.com/GMishx)
- [Avinal Kumar](https://github.com/avinal)
-47
View File
@@ -1,47 +0,0 @@
---
category: gsoc
date: 2021-07-09T22:22:00
description: This week was dedicated to perfecting CMake Installation Configuration.
The installation was tested and bugs were discussed.
image: /images/tech-wallpaper-8.webp
tags:
- gsoc
- FOSSology
title: Coding Week 5 Meeting
---
This week was dedicated to perfecting CMake Installation Configuration. The installation was tested and bugs were discussed.
## Week 5 Progress
> CMake Installation Configuration is almost complete.
>
> - FOSSology can be installed completely via CMake
> - Post install script generation also added
> - To test the current progress, follow the instructions [here](https://github.com/avinal/FOSSology/wiki#test-the-new-system-only-gcc-with-make-and-ninja-tested-for-now)
## Discussions
- There are permission problems while running bash script of `nomos`,
`monk` and `genvendor`.
- One possible fix can be to add `bash` before each bash scripts.
- The other fix is to modify shebang line in each script from
`#!/bin/sh` to `#!/bin/bash`.
- In copyright agent same files are being compiled thrice, this is
slowing down the build.
- I am working on it. The problem is occurring because of three
different executables.
- I will try to combine the common objects together.
- There are some redundant files in the installation. And VERSION file
is missing in `/usr/local/share/fossology`.
## Conclusion and Further Plans
- Fix copyright build.
- Remove redundant files and folders.
- Fix permission issues.
## Attendees
- [Gaurav Mishra](https://github.com/GMishx)
- [Avinal Kumar](https://github.com/avinal)
-65
View File
@@ -1,65 +0,0 @@
---
category: gsoc
date: 2021-07-23T22:22:00
description: This week I implemented CMake packaging configuration for FOSSology.
There were two meetings in this week and this report covers both of them.
image: /images/tech-wallpaper-9.webp
tags:
- gsoc
- FOSSology
title: Coding Week 7 Meeting
---
This week I implemented CMake packaging configuration for FOSSology. There were two meetings in this week and this report covers both of them.
## Week 7 Progress
> Initial CMake packaging configuration implemented.
>
> - Packages can be built according to the FOSSology previous packaging structure.
> - Copyright, ecc and keyword now builds faster.
> - To test the current progress, follow the instructions [here](https://github.com/avinal/FOSSology/wiki#test-the-new-system-only-gcc-with-make-and-ninja-tested-for-now)
## Discussions
- **Where I can find packaging info for FOSSology?**
- All the scripts and companion files are located inside `debian`
folder.
- The most important files are `control`, which contains the
dependency and description of each package, and `rules` file, which
contains the make commands for creating the packages.
- **What are** `${shlibs:Depends}` **and** `${misc:Depends}` ?
- They are dependencies required for creating Debian packages. CMake
should be adding them by default so we can safely ignore them.
- **Will the new packages have the same structure as the old ones?**
*(Michael)*
- Yes for compatibility purposes Gaurav has suggested exactly follow
the same structure as the old one.
- **Copyright build is slow because the same object files are being
compiled three times, can you improve that?** *(Gaurav)*
- I can try compiling the common object files beforehand and then
adding the executables. But how to know the common object files?
- Gaurav showed me where in the Makefiles I can find the common object
files.
- There are problems with copying the symbolic link and packaging them.
So I have to find some alternatives to resolve that.
- With component installing, package description can no longer be set.
- The `fossology-common` package contains file from `fossology-db`
package. And the `fossology-db` package is empty.
- Gaurav said this was unexpected and should not happen. This seems to
be a very old bug with packaging.
## Conclusion and Further Plans
- Work more on the packaging.
- Improve compilation of copyright and monk agents
- Try to solve the packaging bug and add a pull request for that.
- Move on to implementing testing configurations.
## Attendees
- [Michael C. Jaeger](https://github.com/mcjaeger)
- [Gaurav Mishra](https://github.com/GMishx)
- [Anupam Ghosh](https://github.com/ag4ums)
- [Shaheem Azmal M MD](https://github.com/shaheemazmalmmd)
- [Avinal Kumar](https://github.com/avinal)
-59
View File
@@ -1,59 +0,0 @@
---
category: gsoc
date: 2021-07-30T22:47:00
description: This week I implemented CMake packaging configuration for FOSSology.
The new configuration fixes issue with previous packaging configurations. It also
retains the component wise installation features.
image: /images/tech-wallpaper-10.webp
tags:
- gsoc
- FOSSology
title: Coding Week 8 Meeting
---
This week I implemented CMake packaging configuration for FOSSology. The new configuration fixes issue with previous packaging configurations. It also retains the component wise installation features.
## Week 8 Progress
> CMake Packaging configuration almost completed.
- Packages can be built according to the FOSSology previous packaging structure.
- Initial testing configuration added.
- Ninja build has been fixed.
- To test the current progress, follow the instructions [here](https://github.com/avinal/FOSSology/wiki#test-the-new-system-only-gcc-with-make-and-ninja-tested-for-now)
## Discussions
- **How is the testing implemented in FOSSology?**
- Not all agents have testing implemented.
- There are two types of tests *Unit* and *Functional*.
- At first, the test executable calls multiple PHP scripts to create a
test environment. And then tests are executed.
- Files related to testing and common for all the agents are in
`src/testing`
- Other tests depends on `phpunit`. This *PHPUnit* is generated inside
`vendor`.
- **As of now, the testing configurations are hardcoded, what should I
do, because it seems the testing configuration will require changes to
a lot of files?**
- Decide a deadline for the testing configuration and if until that
point there is not very productive implementation then move to the
next task that is implementing CI.
- As of now building, installation, and packaging via CMake is working
and in a stable state. To create an initial Pull Request. This would
also be useful in case of the final evaluation and further testing
will be based on this PR itself.
- Fix any bugs or if there is the scope of improvement in Building,
Installation and Packaging do that.
## Conclusion and Further Plans
- Prepare for an initial PR.
- Fix known bugs and apply Improvements.
- Work on testing configurations.
## Attendees
- [Gaurav Mishra](https://github.com/GMishx)
- [Shaheem Azmal M MD](https://github.com/shaheemazmalmmd)
- [Avinal Kumar](https://github.com/avinal)
-365
View File
@@ -1,365 +0,0 @@
---
category: gsoc
date: 2023-03-30T21:14:00
description: It has been 2 years since I was a Google Summer of Code Student. It was
an outstanding opportunity and I really enjoyed working on the project. Not only
that, but it added numerous skills to my resume and polished many others. Today
I want to make my proposal public, that helped me get selected.
image: /images/panda-engineer.webp
tags:
- gsoc
- fossology
- proposal
title: New Build System and improving CI/CD workflow
---
It has been 2 years since I was a Google Summer of Code Student. It was an outstanding opportunity and I really enjoyed working on the project. Not only that, but it added numerous skills to my resume and polished many others. Today I want to make my proposal public, that helped me get selected.
## Current Build System and Workflow
### Build System
FOSSologys build system is based on multilevel Makefile that work together to
provide a build infrastructure for the project. Although make is a robust build
system, but it is too outdated and slow compared to modern build systems. Although
build configurations are not supposed to be updated as often as source files,
there are few noticeable problems with make.
* Configuration is mostly hard-coded, i.e., if needed to use different tools or add source files, the Makefile needs to be updated
* All the dependencies and libraries have to be added manually by writing configuration for each of them
* Although the FOSSology project currently supports Linux only, if in the future it has to be ported to other platforms, make wont be able to support it. Hence, it is not future safe.
### Workflow (Continuous Integration)
FOSSology project has been using open-source tier Travis CI for all its continuous
integration and deployment needs. GitHub launched its CI/CD system some years ago,
and it has become a standard for CI/CD. Travis CI does the work but provides significantly
fewer features when compared to GitHub Actions.
* It has been observed that Travis CI is noticeably slower than GitHub Action for a similar configuration
* Travis CI lacks the tight and seamless integration of GitHub Actions with other GitHub Services, some of them are the ability to integrate and communicate with GitHub apps, auto-manage to pull requests and issues, better support for Dockerized builds.
## Why a New Build System(CMake)?
There were many possible candidates for a new build system for the FOSSology project.
Each has its pros and cons. After numerous comparisons and the ability of the new
build system to integrate well with the existing system, CMake seems to be the best
choice. Given below is a quick overview of different build systems and their execution times.
![Configure and Build time comparision](/images/tools-build-comparision.webp)
Here, CMake (Make & Ninja) performs better than average compared to other tools.
The criteria for choosing CMake were not only performance, but many other factors.
* The build system should be easily available on all supported distros - Cmake supports _UNIX, MS Windows (MSVC, Borland, Cygwin, MinGW) and Mac OS X, and more_
* It should be easy to install CMake is available via all popular package managers and repositories
* Should improve build speed In general, CMake always outperforms bare metal make systems.
* The learning curve is not too steep CMake is not very hard and neither too easy to learn. For common projects, it is easy to learn.
### CMake Perks
* No other dependencies apart from the C/C++ compiler
* Includes a testing framework (CTest)
* Includes a multipurpose packaging solution (CPack)
* Migrating from Make to CMake is easier compared to other build systems
* Can generate platform-specific build configuration; hence the same script can be used for multiple platforms
* All modern C/C++ IDEs have inbuilt support for CMake or via a plugin (Visual Studio, XCode, CLion)
* Can load dependencies automatically from the internet or local file system
* Source and build folders are separate by default in CMake, this avoids bloating the source folders and accidentally deleting important files.
### Comparison of CMake and Make syntax
#### Make Syntax
```makefile
CXXFLAGS = -I../include -I.
SRC := $(wildcard *.cc)
DEP := $(patsubst %.cc,%.d,$(SRC))
OBJ := $(patsubst %.cc,%.o,$(SRC))
all: $(PROGNAME)
$(PROGNAME): $(OBJ) ../lib/$(LIBNAME)
$(CXX) $(CXXFLAGS) $^ -o $@
%.d: %.cc
$(CXX) -MM $(CXXFLAGS) $< | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@
ifneq ($(filter clean,$(MAKECMDGOALS)),clean)
-include $(DEP)
endif
clean:
$(RM) $(DEP) $(OBJ) $(PROGNAME)
```
#### Corresponding CMake File
```cmake
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} source)
add_executable(hellocmake ${source})
target_link_libraries(hellocmake LINK_PUBLIC libhellocmake)
```
### How to (c)make the move?
#### Step 1: Determine the total number and types of Makefiles to migrate
We will determine the required time for the whole migration and the number of respective
CMake scripts to be written. In general, CMake scripts have fewer lines than Make
scripts for the same task. However, the top-level CMake configuration can be very
complex depending on how many configurations we want to create.
* There are [168 Makefile](https://github.com/search?q=Makefile+repo%3Afossology%2Ffossology+filename%3A%22Makefile%22&type=Code)configurations as of now in FOSSology Project
* Types: Build, Install, Test, Uninstall, Coverage, Clean, Package, and other sister types
#### Step 2: Start migrating Makefiles one agent/directory at a time
The FOSSology projects build system follows a bottom-up approach. That means all
the child directories need to be built first to build their parents. Since most
of the agents in FOSSology are independent programs, their CMake config can be
written separately. I have created a sample project to demonstrate the Make and
CMake syntax and build process. It also demonstrates the cross-platform ability
of CMake. The project can be accessed here: [https://github.com/avinal/make-cmake](https://github.com/avinal/make-cmake)
#### Step 3: Create the Top-Level CMakeLists.txt to link all the libraries
The top-level CMakelIsts.txt will be complex and most of the work, as well as testing,
will be done during this phase. In the initial stage, I plan to create just the
minimum to at least build the whole project in one go without any bells and whistles.
#### Step 4: Add required configurations (Install, Package, Test)
Once the top-level CMakeLists.txt is building the project without any problems.
We will now add the required configurations such as install, package, test, uninstall,
and other configurations.
#### Step 5: Test the new Build System
It is almost done, we may start testing our shiny build system. Checking every
single configuration for errors and loopholes. This step will also make use of a
new CI/CD system for testing purposes. Thus, simultaneously migrating the CI from
Travis CI to GitHub Actions.
## Improving the CI/CD workflow
With the new build system, the FOSSology project will get a new CI/CD too. There
were several tasks proposed for improving the workflow of FOSSology. I have completed
many of them already. Given Below is an overview of the tasks proposed and their status.
* Syntax Check ([#1919](https://github.com/fossology/fossology/pull/1919))
* Static Code Analysis ([#1919](https://github.com/fossology/fossology/pull/1919))
* Copy/Paste Detector ([#1919](https://github.com/fossology/fossology/pull/1919))
* PHP Codesniffer ([#1919](https://github.com/fossology/fossology/pull/1919))
* Docker Tests
* C/C++ agent tests
* PHPUnit tests
* GitHub Page Release ([#1917](https://github.com/fossology/fossology/pull/1917))
* Implementing Caching in workflows
* Implement source install (reference[#207](https://github.com/fossology/fossology/issues/207))
* DOC, Commit, and PR guideline checks
### How will the workflow improve?
We are migrating the whole workflow to the GitHub Actions platform, in general,
GHA provides better integration and builds time.
#### Step 6: Migrate the C/C++ agent tests and PHPUnit Tests
By this time, we have already migrated our build system to CMake and thus the new
workflow will be based on CMake configurations. The goal will be to add more platforms
(Debian/Ubuntu/Fedora etc.) for tests and upgrade the tools to their latest compatible versions.
#### Step 7: Implement Source Install test for Ubuntu, Debian, and Fedora
As of now, source install is not tested for any of the distributions, so this step
aims at adding source install testing capability to the new CI.
#### Step 8: Implement caching in workflows and testing
GitHub Action can store cache dependencies for a given period and thus reduces the
number of times the virtual machine has to fetch packages. This in turn reduces
the overall build time as well as reduces the load on servers.
## Project Deliverables
* New Build System (CMake) for the project
* New Packaging, Install and Test configuration
* C/C++ agents tests for multiple versions of GCC
* PHPUnit tests
* Docker Tests
* Cached Workflows
* Source installs tests for Debian, Ubuntu, Fedora
* Checks for Pull Requests and Commit guidelines
## Other Deliverables
* For track my progress as well as a resource for future contributors, I will be writing a weekly/biweekly blog. The same can be used for preparing the final GSoC report.
* Since CMake will be new for the FOSSology Community, I will document all the important topics that I will come across while migrating the build system. This will be both a handpicked resource and a reference for future contributors.
* I would love to be a part of the community even after GSoC, although the build system and CI/CD doesnt need to be updated that often, I would like to contribute to other parts of the project.
## Experience
I have 3 years of experience in C/C++ programming and one year of experience with
CMake and Make. I have used CMake and Make for many of my projects, as well as contributed
to other open-source projects. Furthermore, I have created/migrated the CI/CD for
many open-source organizations to GitHub Actions, and created many personal projects
using GHA as well.
I have been contributing to many open-source organizations since 2019. I participated
as a Technical Writer in the Google Season of Docs 2021 program under the VideoLAN
organization. So, I have a nice understanding of open-source project workflow and
contribution standards. I am well versed in Git and GitHub.
## Tech Stack
* CI/CD: **GitHub Actions, Travis CI**
* Build Systems: **CMake, Make**
* Languages: **C/C++, PHP, Shell Script**
* Version Control: **Git, GitHub**
* OS: **Ubuntu, Fedora, Debian**
* Compilers: **GCC, Clang**
* Containers: **Docker**
## Proposed Timeline
### Community Bonding (May 17th - June 6th, 2021)
* Discussing and collaborating with fellow participants and getting familiar with the FOSSology community and projects.
* Since CMake is new for our FOSSology community, I will learn and bring in the resources so that people get comfortable with it before the coding period starts.
* Going through the codebase and plan strategies for the migration, his includes identification of various types, segregation of libraries, executables, and dependencies.
### Coding Week 1 (June 7th - June 13th, 2021)
* Plan the priority order of migration, and create lists for all different configurations
* Create CMake configuration for libraries.
* There are approximately 8 libraries, since configuration is not that complex, it should take no longer than 1 week to complete
### Coding Week 2 & 3 (June 14th - June 27th, 2021)🚩
* If libraries are complete, migrate the agents one by one, since FOSSOlogy is based on a modular architecture, many agents can be independently migrated
* There are some 27 agents, 2 agents per day should take 2 weeks; hence I have merged these weeks.
* Time may vary for different agents to be migrated to CMake, but on average, this should take 2 weeks.
* Buffer Period
### Coding Week 4 (June 28th - July 4th, 2021)
* By now all the agents and libraries are migrated and presently the top-level CMakeLists.txt should be created. Since this file will be complex and will need all the child configuration to work, the testing and completion should approximately take 1 week.
* This week will also check the overall gains in terms of performance and stability of the new build system.
* This is also the minimum requirement for the build system to be said working and to add more configurations
### Coding Week 5 (July 5th - July 11th, 2021)🚩
* This week will continue the development of the Top-level CMake configuration.
* More configuration will be added for Install, Test, Uninstall, Package
* If completed, testing will start and will continue for the next week
* Buffer Period
### Coding Week 6 (July 12th - July 18th, 2021) First Evaluation
* The build system is a very crucial element of the project; hence it must be tested thoroughly before final rolling.
* This week, I will continue the development of all required configuration and testing of the new Build System.
* By the end of this week, the new build system will be able to properly build the project and use the configurations, this also marks the end of the first phase and first evaluation.
* Buffer Period
### Coding Week 7 (July 19th - July 25th, 2021)
* With all the build system working, this week will be used to migrate the CI from Travis to GitHub Actions starting with the C/C++ agents test
* Now the C++ agent tests will be executed using the new Build System
* If completed, then the PHPUnit test migration will start
### Coding Week 8 (July 26th - August 1st, 2021)🚩
* Complete the PHPUnit CI migration
* Add Docker tests
* Start implementing source install test CI
### Coding Week 9 (August 2nd - August 8th, 2021)
* Complete Source Install CI
* Start implementing workflow caching
* Fixing bugs and clearing backlogs
* Buffer Period
### Coding week 10 (August 9th - August 15th, 2021)🚩
* Checking the build system
* Checking the CI/CD
* Completing reports and documentation
* Update the existing documentation and readme for the new build system and CI
### Final Evaluations (August 16th - August 23rd, 2021)
* Code and report submission
### Milestones 🚩
1. All agents and libraries have now a CMake build configuration
2. Top-level CMake configuration with a stable build
3. Top-level CMake configuration with other configs i.e. install, package, test
4. C/C++ agent tests, PHPUnit test implemented in CI
5. CI/CD is complete according to the task list
## **Pre GSoC Involvements**
### In FOSSology
* [feat(CI): Migrate API docs generation and deployment to GitHub Actions](https://github.com/fossology/fossology/pull/1917) [MERGED]
* [feat(CI): Migrate Static Checks and Analysis to GitHub Actions from Travis CI](https://github.com/fossology/fossology/pull/1919) [MERGED]
* [fix(make): Fix warnings in make for Ubuntu 20.04.2 LTS](https://github.com/fossology/fossology/pull/1923) [OPEN]
* [Upgrade this project from PHP 7 to PHP 8](https://github.com/fossology/fossology/issues/1920) [ISSUE]
* [Improving build system and CI/CD flow](https://github.com/fossology/fossology/discussions/1931) [DISCUSSION]
### Other Contributions
* [VideoLAN/VLC for Android User Documentation](https://code.videolan.org/docs/vlc-android-user) [PROJECT]
* [boostorg/gil](https://github.com/boostorg/gil/issues?q=author%3Aavinal) [2 PR, 1 ISSUE]
* [embox/embox](https://github.com/embox/embox/issues?q=author%3Aavinal) [1 PR]
* [JetBrains/swot](https://github.com/JetBrains/swot/pulls?q=author%3Aavinal) [1 PR]
* [jupyter-xeus/xeus-sqlite](https://github.com/jupyter-xeus/xeus-sqlite/issues?q=author%3Aavinal) [1 PR, 1 ISSUE]
* [github/explore](https://github.com/github/explore/pulls?q=avinal) [2 PR]
## My Development Environment
* Operating Systems: Ubuntu 20.04 LTS, Windows 10 20H2
* Editors: Visual Studio Code, Vim
* IDE: Visual Studio, CLion
* Internet Speed: 20 Mbps
## References and Resources
1. [A sample Make CMake project structure and comparison](https://github.com/avinal/make-cmake)
2. [CMake Reference Documentation — CMake 3.20.0 Documentation](https://cmake.org/cmake/help/latest/)
3. [A simple comparison](https://mesonbuild.com/Simple-comparison.html) of different build systems
4. [Why the KDE project switched to CMake -- and how (continued)](https://lwn.net/Articles/188693/)
5. [bksys / scons (Re: win32 port)](https://mail.kde.org/pipermail/kde-buildsystem/2006-January/000410.html)
6. [CMake vs Make](https://prateekvjoshi.com/2014/02/01/cmake-vs-make/)
## Motivation
Ever since I came to know about GSoC(that was in my first year), I wanted to be
a part of it. This was even before I got the idea of Open Source. Once I started
contributing to open source, I started liking it and gradually became a part. I
did Google Season of Docs 2020 under the VideoLAN organization and got a nice overview
of open-source development, communities, and programs.
I found that the FOSSology community is very passionate about open-source contributions,
and they welcome experts and noobs alike. Other than that, open community meetings
are one of the best things I encountered in my open-source journey. I hope by being
a part of this community I will exchange skills and experiences and thus help both
the community and me.
## Commitments
This summer, I dont have any classes or internships. I found this project very
fascinating, and I have already worked out a portion of this project, so this project
is my _priority_. Although the program is supposed to be part-time, I will be able
to work full time as well on weekends. I will attend all the meetings and prepare
reports on time. I am an active member of the community presently, and will continue
the streak during GSoC as well as after GSoC.
**Thanks**
@@ -1,3 +0,0 @@
---
draft: true
---
@@ -1,142 +0,0 @@
---
title: Everything on my Pi
date: 2024-04-29T10:47:00
category: raspi
image: /images/big-raspberry-pi.webp
description: A list of everything I have installed on my Raspberry Pi 5 and 4B.
tags:
- raspi
- linux
- pi
- raspbian
- debian
- ubuntu
- server
- docker
---
I always wanted to have my self-hosted server when I was in college. Never had enough money to do much until recently.
So after I got my first job, I have invested moderately (heavily ;)) in gadgets and stuff. And one of my most prized
possession is my Raspberry Pi 4 and Raspberry Pi 5. I have been using it for a while now, and I have installed many
useful things on both of them. So I thought I would share it with everyone. This is a list of everything I have on my
Pi.
## Hardware and Specifications
- [Raspberry Pi 5 8GB Model](https://www.raspberrypi.com/products/raspberry-pi-5/)
- [Raspberry Pi 4B 8GB Model](https://www.raspberrypi.org/products/raspberry-pi-4-model-b/)
- [Raspberry Pi 15W USB-C Power Supply](https://www.raspberrypi.com/products/type-c-power-supply/)
- [Raspberry Pi 27W USB-C Power Supply](https://www.raspberrypi.com/products/27w-power-supply/)
- [Samsung SSD 970 EVO Plus 500GB](https://www.samsung.com/us/computing/memory-storage/solid-state-drives/ssd-970-evo-plus-nvme-m-2-500gb-mz-v7s500b-am/)
- [WD Blue SA510 SATA SSD M.2 2280](https://www.westerndigital.com/en-in/products/internal-drives/wd-blue-sa510-sata-m-2-ssd?sku=WDS500G3B0B)
- [Pimoroni NVMe Base for Raspberry Pi 5](https://shop.pimoroni.com/products/nvme-base?variant=41219587178579)
- [PiBOX NVMe SSD Enclosure](https://pibox.in/product/nvme-m2-enclosure-pibox-india-nvme-ssd-enclosure-usb-3-2-10gbps-tool-free-m-2-nvme-case-pci-e-nvme-reader-usb-c-supports-m-bm-keys-2230-2242-2260-2280-ssds-powerful-jm583-chipset/)
I already had a good quality ethernet cables and micro SD cards lying around. You may ask if I am using SSD then why use
a SD Card. The simple answer is that I am using an SSD for storing everything, but all the OS functions are still run on
the SD card. In an unlikely event, I can just pull out the SSD and plug it in a different machine to access my data.
## Applications I am hosting
I won't be going into many details about my configurations in this post. I will probably cover them in separate posts.
Here I will put a list of all the applications I am hosting and what I use them for.
I am using [Tailscale](https://tailscale.com/) to connect to my servers. They are locked down for access without
Tailscale network. There is an open source alternative called [Headscale](https://github.com/juanfont/headscale) as
well, but I haven't given much though of self-hosting them yet. For server management I am
using [RunTipi](https://runtipi.io/). It uses docker compose to manage all application install.
I will be listing the applications in the decreasing order of my priority.
### Immich
| Website | Source | Category | Platforms | Similar |
|-------------------------------|------------------------------------------------|--------------------------|-------------------|---------------|
| [Immich](https://immich.app/) | [GitHub](https://github.com/immich-app/immich) | Photos and Videos Backup | Web, Android, iOS | Google Photos |
Immich is the best open source and feature rich replacement to Google Photos. For starters the installation is very
easy, and you can install clients on Android and iOS. You can also use a CLI import tool to upload all your media
easily. You get most of the Google Photos feature expect the editing tools. The project is in active development and the
feature set is increasing day-by-day. You can see a comparision with other FOSS
alternatives [here](https://meichthys.github.io/foss_photo_libraries/).
### Paisa
| Website | Source | Category | Platforms | Similar |
|-----------------------------|---------------------------------------------------|----------------------------|-----------|------------------|
| [Paisa](https://paisa.fyi/) | [GitHub](https://github.com/ananthakumaran/paisa) | Finance and Budget Manager | Web | Beancount,ledger |
It is really hard to keep track of all expenses from multiple accounts and credit cards. There are great solutions and
applications but either they are too [complex](https://www.firefly-iii.org/) or paid. If you still decide to use them
most of them don't fit well with Indian users, simply because they were not planned with such users in mind. Nothing
wrong there but mindset and habits of users matters a lot in such kind of applications. This application became my
immediate favorite once I installed. There are many thing this application gets right. First of them is the ease to
use UI and use of India specific terms and inspired from Indian spending habits. There is a bit of learning curve since
this application builds on top of [Plain Text Accouting](https://plaintextaccounting.org/), but it starts making sense
once you learn it. The developer is an experienced Software engineer from India. This will work for most of the world
but for Indian users this is a must-have if you are looking for such application. I wish it can have an android app as
well. But the current web UI is more than enough.
### Vikunja
| Website | Source | Category | Platforms | Similar |
|--------------------------------|-----------------------------------------------|--------------|-----------|-----------------------|
| [Vikunja](https://vikunja.io/) | [Gitea](https://kolaente.dev/vikunja/vikunja) | Todo, Kanban | Web | Google Tasks, Todoist |
There are many great open source todo and kanban applications, I have tested many of them and settled for Vikunja. For
personal use it was easy to set up. It has all the necessary features but is not bloated. The UI is good and it also
supports CalDAV. An Android application is still in progress but you can utilize CardDAV with applications
like [DavX5](https://www.davx5.com/) or [Tasks.org](https://tasks.org/). You can also create teams and have
different projects.
### Atuin
| Website | Source | Category | Platforms | Similar |
|----------------------------|--------------------------------------------|--------------------|-----------------------|------------|
| [Atuin](https://atuin.sh/) | [GitHub](https://github.com/atuinsh/atuin) | Shell History sync | Linux, MacOS, Android | zsh-histdb |
I have 4 servers and many devices, it is not often easy to get the similar commands on different machines. That is where
Atuin comes in. Atuin replaces your existing shell history with a SQLite database, and records additional context for
your commands. Additionally, it provides optional and fully encrypted synchronisation of your history between machines,
via an Atuin server.
### Gitea
| Website | Source | Category | Platforms | Similar |
|-----------------------------------|---------------------------------------------|------------------|-----------|---------------------------|
| [Gitea](https://about.gitea.com/) | [GitHub](https://github.com/go-gitea/gitea) | Git hosting, VCS | Web | GitHub, BitBucket, GitLab |
Gitea is a GitHub replacement written in Go. It includes a lot of features from GitHub including package registry,
CI/CD, team collaboration etc. I have not been actively using it. But I plan to host my personal projects here.
### Paperless-ngx
| Website | Source | Category | Platforms | Similar |
|--------------------------------------------------|----------------------------------------------------------|----------------------------|--------------|----------|
| [Paperless-ngx](https://docs.paperless-ngx.com/) | [GitHub](https://github.com/paperless-ngx/paperless-ngx) | Document Management System | Web, Android | Docspell |
This is a document management application where I can store my PDF/text documents (not ebooks). It has built in OCR and
other useful feature to organise and search through your documents.
### Shiori
| Website | Source | Category | Platforms | Similar |
|---------|-----------------------------------------------|------------------|----------------------------|--------------------|
| - | [GitHub](https://github.com/go-shiori/shiori) | Bookmark Manager | Web, Linux, MacOS, Windows | LinkWarden, Pocket |
Shiori is a simple bookmarks manager written in the Go language. Intended as a simple clone of Pocket. You can use it as
a command line application or as a web application. This application is distributed as a single binary, which means it
can be installed and used easily. There is a third party Android app as well. You can get
it [here](https://f-droid.org/en/packages/com.desarrollodroide.pagekeeper/).
## What is missing
I am still searching apps for a general purpose file server and ebook management. A lot of people have suggested and I
have also tried Nextcloud for file storage. I also believe it is the best open source alternative, but deep down it
feels laggy and too much bloated for personal use. I would prefer something very minimal that solely works as a file
server and explore and nothing else. Similarly, with ebooks, Calibre is good, but it feels outdated.
If you do have some great suggestions, please put them in comments down below. You can use GitHub sign in or put an
anonymous comment.
@@ -1,3 +0,0 @@
---
draft: true
---
@@ -1,3 +0,0 @@
---
draft: true
---
-60
View File
@@ -1,60 +0,0 @@
baseURL: 'https://avinal.space/'
languageCode: en-us
title: Fedoraemon
menus:
main:
- name: Home
pageRef: /
weight: 10
- name: Posts
pageRef: /posts
weight: 20
- name: Tags
pageRef: /tags
weight: 30
module:
hugoVersion:
extended: false
min: 0.116.0
params:
showWordCount: true
showReadingTime: true
toc: true
numberedSubtitles: true
navs:
- name: Home
link: https://avinal.space
- name: About
link: https://avinal.space/pages/about-me
- name: Blog
link: https://avinal.space/posts
- name: Projects
link: https://avinal.space/pages/projects
- name: GitHub
link: https://github.com/avinal
disableKinds: ["home", "taxonomy"]
taxonomies:
category: category
tag: tags
permalinks:
tags: "/posts/tags/:slug"
category: "/posts/category/:slug"
markup:
highlight:
anchorLineNos: false
# codeFences: true
guessSyntax: false
lineNoStart: 1
# lineNos: true
# lineNumbersInTable: true
noClasses: true
noHl: false
style: base16-snazzy
goldmark:
renderer:
unsafe: true
@@ -1,3 +0,0 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}
<a href="#{{ .Anchor | safeURL }}">#</a>
</h{{ .Level }}>
-18
View File
@@ -1,18 +0,0 @@
<!DOCTYPE html>
<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}"
dir="{{ or site.Language.LanguageDirection `ltr` }}">
<head>
{{ partial "head.html" . }}
</head>
<body class="bg-neutral-800">
<main class="container mx-auto">
{{ block "main" . }}{{ end }}
<footer>
{{ partial "footer.html" . }}
</footer>
</main>
</body>
</html>
-7
View File
@@ -1,7 +0,0 @@
{{ define "main" }}
{{ .Content }}
{{ range site.RegularPages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ .Summary }}
{{ end }}
{{ end }}
-78
View File
@@ -1,78 +0,0 @@
{{ define "main" }}
<div
class="prose prose-invert mx-auto prose-lg prose-a:decoration-cyan-500 hover:prose-a:decoration-pink-500 text-white">
<div class="md:-mx-8 lg:-mx-16 px-8 py-1">
<h1 class="text-5xl font-bold mb-6 mt-12 text-center">{{ .Title }}</h1>
{{ .Content }}
</div>
</div>
<section class="text-gray-100">
<div class="max-w-6xl p-6 mx-auto space-y-6 sm:space-y-12 mb-16">
{{ range first 1 .Pages }}
<div
class="block max-x-sm gap-3 mx-auto sm:max-w-full group hover:no-underline focus:no-underline lg:grid lg:grid-cols-12 bg-neutral-900">
<a class="lg:col-span-7" href="{{ .RelPermalink }}">
<img class="object-cover w-full h-64 rounded sm:h-96 lg:col-span-7" src="{{ .Params.Image | absURL }}"
alt="{{ .LinkTitle }}">
</a>
<div class="p-6 space-y-2 lg:col-span-5">
<a href="{{ .RelPermalink }}">
<h3 class="text-2xl font-semibold sm:text-4xl group-hover:underline group-focus:underline">{{ .LinkTitle }}
</h3>
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }}
<time datetime="{{ $dateMachine }}" class="text-gray-400">{{ $dateHuman }}</time>
{{ if gt .ReadingTime 1 }}
{{ .Scratch.Set "timeUnit" "mins" }}
{{ else }}
{{ .Scratch.Set "timeUnit" "min" }}
{{ end }}
{{ if .Site.Params.showReadingTime }}
<span class="text-gray-400"> | ~{{.ReadingTime}} {{ .Scratch.Get "timeUnit" }}</span>
{{ end }}
<p> {{ .Summary | truncate 250 }}</p>
</a>
<span class="flex flex-wrap py-6 space-x-2">
<a class="px-3 py-1 m-1 rounded-sm hover:underline bg-pink-400 text-gray-900 font-bold" href="/posts/category/{{ .Params.Category }}">
{{ .Params.Category }}</a>
</span>
</div>
</div>
{{ end }}
<div class="grid justify-center grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
{{ range after 1 .Pages }}
<div class="max-w-sm mx-auto group hover:no-underline focus:no-underline bg-neutral-900">
<a href="{{ .RelPermalink }}">
<img class="object-cover w-full h-44 rounded" src="{{ .Params.Image | absURL }}" alt="{{ .LinkTitle }}">
</a>
<div class="p-6 space-y-2">
<a href="{{ .RelPermalink }}">
<h3 class="text-2xl font-semibold group-hover:underline group-focus:underline">{{ .LinkTitle }}</h3>
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }}
<time datetime="{{ $dateMachine }}" class="text-gray-400">{{ $dateHuman }}</time>
{{ if gt .ReadingTime 1 }}
{{ .Scratch.Set "timeUnit" "mins" }}
{{ else }}
{{ .Scratch.Set "timeUnit" "min" }}
{{ end }}
{{ if .Site.Params.showReadingTime }}
<span class="text-gray-400"> | ~{{.ReadingTime}} {{ .Scratch.Get "timeUnit" }}</span>
{{ end }}
<p> {{ .Summary | truncate 150 }}</p>
</a>
<span class="flex flex-wrap py-6 space-x-2">
<a class="px-3 py-1 m-1 rounded-sm hover:underline bg-pink-400 text-gray-900 font-bold" href="/posts/category/{{ .Params.Category }}">
{{ .Params.Category }}</a>
</span>
</div>
</div>
{{ end }}
</div>
</div>
</section>
{{ end }}
-32
View File
@@ -1,32 +0,0 @@
{{ define "main" }}
<div class="min-h-screen flex flex-col justify-center relative overflow-hidden">
<div class="relative w-full bg-neutral md:max-w-3xl md:mx-auto lg:max-w-4xl lg:pb-28">
<div class="prose prose-invert mx-auto prose-lg prose-a:decoration-cyan-500 hover:prose-a:decoration-pink-500">
<div class="bg-neutral-900 md:-mx-8 lg:-mx-16 px-8 py-1">
{{ partial "header.html" . }}
<article>
{{ if cond (ne .Params.toc nil) .Params.toc .Site.Params.toc }}
{{ if ne .TableOfContents "<nav id=\"TableOfContents\"></nav>" }}
<details class="open:bg-neutral-800 open:border open:rounded open:border-cyan-700 ">
<summary>
<b>In this post, we'll take a look at:</b>
</summary>
<div class="toc {{ if .Site.Params.numberedSubtitles }}numbered-subtitles{{ end }} ">{{ .TableOfContents }}
</div>
</details>
{{ end }}
{{ end }}
{{ .Content }}
</article>
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
</div>
</div>
{{ partial "comments.html" . (dict "taxonomy" "tags" "page" .) }}
</div>
</div>
{{ end }}
-18
View File
@@ -1,18 +0,0 @@
<script>
!(function (e, n) {
for (var o = 0; o < e.length; o++) {
var r = n.createElement("script"),
c = ".js",
d = n.head || n.body;
"noModule" in r
? ((r.type = "module"), (c = ".mjs"))
: (r.async = !0),
(r.defer = !0),
(r.src = remark_config.host + "/web/" + e[o] + c),
d.appendChild(r);
}
})(remark_config.components || ["embed"], document);
</script>
<div id="remark42" class="md:p-4 mb-16"></div>
-8
View File
@@ -1,8 +0,0 @@
<div class="fixed bottom-0 left-0 bg-neutral-900 p-3 w-full border-t border-cyan-500">
<div class="mx-auto flex justify-center space-x-6 text-gray-400">
{{ range .Site.Params.navs }}
<a class="underline decoration-cyan-500 hover:decoration-pink-500 text-xl" href="{{ .link | safeURL }}">{{ .name
}}</a>
{{ end }}
</div>
</div>
-28
View File
@@ -1,28 +0,0 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title itemprop="name">{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}
</title>
{{ if eq .Section "posts" }}
<meta property="og:title" content="{{ .Title }} | {{ .Site.Title }}" />
<meta name="twitter:title" content="{{ .Title }} | {{ .Site.Title }}" />
<meta itemprop="name" content="{{ .Title }} | {{ .Site.Title }}" />
<meta name="application-name" content="{{ .Title }} | {{ .Site.Title }}" />
<meta property="og:site_name" content="{{ .Site.Params.sitename }}" />
<meta name="description" content="{{ .Params.description }}" />
<meta itemprop="description" content="{{ .Params.description }}" />
<meta property="og:description" content="{{ .Params.description }}" />
<meta name="twitter:description" content="{{ .Params.description }}" />
{{ with .Params.image }}
<meta itemprop="image" content="{{ . | absURL }}" />
<meta property="og:image" content="{{ . | absURL }}" />
<meta name="twitter:image" content="{{ . | absURL }}" />
<meta name="twitter:image:src" content="{{ . | absURL }}" />
{{ else }}
<meta itemprop="image" content="{{ .Site.Params.ogimage | absURL }}" />
<meta property="og:image" content="{{ .Site.Params.ogimage | absURL }}" />
<meta name="twitter:image" content="{{ .Site.Params.ogimage | absURL }}" />
<meta name="twitter:image:src" content="{{ .Site.Params.ogimage | absURL }}" />
{{ end }}
{{ end }}
{{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }}
-9
View File
@@ -1,9 +0,0 @@
{{- with resources.Get "css/main.css" }}
{{- if eq hugo.Environment "development" }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{- else }}
{{- with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{- end }}
{{- end }}
{{- end }}
-12
View File
@@ -1,12 +0,0 @@
{{- with resources.Get "js/main.js" }}
{{- if eq hugo.Environment "development" }}
{{- with . | js.Build }}
<script src="{{ .RelPermalink }}"></script>
{{- end }}
{{- else }}
{{- $opts := dict "minify" true }}
{{- with . | js.Build $opts | fingerprint }}
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script>
{{- end }}
{{- end }}
{{- end }}
-25
View File
@@ -1,25 +0,0 @@
<header class="relative">
<img class="object-cover w-full h-60 sm:h-96 brightness-50" src="{{ .Params.Image | absURL }}" alt="{{ .Title }}">
<h1 class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-center w-full text-white">{{ .Title }}</h1>
<span class="absolute bottom-1/4 left-1/2 -translate-x-1/2 text-base font-sans oldstyle-nums text-center w-full">
<a class="font-bold no-underline hover:text-pink-500" href="/">Avinal Kumar</a>
|
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }}
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
{{ if .Site.Params.showWordCount }}
<span>| {{ .WordCount }} words</span>
{{ end }}
{{ if gt .ReadingTime 1 }}
{{ .Scratch.Set "timeUnit" "mins" }}
{{ else }}
{{ .Scratch.Set "timeUnit" "min" }}
{{ end }}
{{ if .Site.Params.showReadingTime }}
<span>| ~{{.ReadingTime}} {{ .Scratch.Get "timeUnit" }}</span>
{{ end }}
</span>
</header>
-51
View File
@@ -1,51 +0,0 @@
{{- /*
Renders a menu for the given menu ID.
@context {page} page The current page.
@context {string} menuID The menu ID.
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
*/}}
{{- $page := .page }}
{{- $menuID := .menuID }}
{{- with index site.Menus $menuID }}
<nav>
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
</nav>
{{- end }}
{{- define "partials/inline/menu/walk.html" }}
{{- $page := .page }}
{{- range .menuEntries }}
{{- $attrs := dict "href" .URL }}
{{- if $page.IsMenuCurrent .Menu . }}
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
{{- else if $page.HasMenuCurrent .Menu .}}
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
{{- end }}
{{- $name := .Name }}
{{- with .Identifier }}
{{- with T . }}
{{- $name = . }}
{{- end }}
{{- end }}
<li>
<a
{{- range $k, $v := $attrs }}
{{- with $v }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end }}
{{- end -}}
>{{ $name }}</a>
{{- with .Children }}
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
{{- end }}
</li>
{{- end }}
{{- end }}
-22
View File
@@ -1,22 +0,0 @@
{{- /*
For a given taxonomy, renders a list of terms assigned to the page.
@context {page} page The current page.
@context {string} taxonomy The taxonony.
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
{{- $page := .page }}
{{- $taxonomy := .taxonomy }}
{{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }}
<span class="flex flex-wrap py-6 space-x-2 border-t border-gray-500">
<!-- <a class="px-3 py-1 m-1 rounded-sm hover:underline bg-pink-400 text-gray-900 font-bold" href="/category/"></a> -->
{{- range . }}
<a class="px-3 py-1 m-1 rounded-sm bg-cyan-500 text-gray-900" href="{{ .RelPermalink }}">#{{ .LinkTitle }}</a>
{{- end }}
</span>
{{- end }}
-545
View File
@@ -1,545 +0,0 @@
/*
! tailwindcss v3.3.6 | MIT License | https://tailwindcss.com
*/
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
box-sizing: border-box;
/* 1 */
border-width: 0;
/* 2 */
border-style: solid;
/* 2 */
border-color: #e5e7eb;
/* 2 */
}
::before,
::after {
--tw-content: '';
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
*/
html {
line-height: 1.5;
/* 1 */
-webkit-text-size-adjust: 100%;
/* 2 */
-moz-tab-size: 4;
/* 3 */
-o-tab-size: 4;
tab-size: 4;
/* 3 */
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
/* 4 */
font-feature-settings: normal;
/* 5 */
font-variation-settings: normal;
/* 6 */
}
/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/
body {
margin: 0;
/* 1 */
line-height: inherit;
/* 2 */
}
/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/
hr {
height: 0;
/* 1 */
color: inherit;
/* 2 */
border-top-width: 1px;
/* 3 */
}
/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/
abbr:where([title]) {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
/*
Remove the default font size and weight for headings.
*/
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: inherit;
}
/*
Reset links to optimize for opt-in styling instead of opt-out.
*/
a {
color: inherit;
text-decoration: inherit;
}
/*
Add the correct font weight in Edge and Safari.
*/
b,
strong {
font-weight: bolder;
}
/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp,
pre {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
/* 1 */
font-feature-settings: normal;
/* 2 */
font-variation-settings: normal;
/* 3 */
font-size: 1em;
/* 4 */
}
/*
Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/
table {
text-indent: 0;
/* 1 */
border-color: inherit;
/* 2 */
border-collapse: collapse;
/* 3 */
}
/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
/* 1 */
font-feature-settings: inherit;
/* 1 */
font-variation-settings: inherit;
/* 1 */
font-size: 100%;
/* 1 */
font-weight: inherit;
/* 1 */
line-height: inherit;
/* 1 */
color: inherit;
/* 1 */
margin: 0;
/* 2 */
padding: 0;
/* 3 */
}
/*
Remove the inheritance of text transform in Edge and Firefox.
*/
button,
select {
text-transform: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/
button,
[type='button'],
[type='reset'],
[type='submit'] {
-webkit-appearance: button;
/* 1 */
background-color: transparent;
/* 2 */
background-image: none;
/* 2 */
}
/*
Use the modern Firefox focus style for all focusable elements.
*/
:-moz-focusring {
outline: auto;
}
/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/
:-moz-ui-invalid {
box-shadow: none;
}
/*
Add the correct vertical alignment in Chrome and Firefox.
*/
progress {
vertical-align: baseline;
}
/*
Correct the cursor style of increment and decrement buttons in Safari.
*/
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/
[type='search'] {
-webkit-appearance: textfield;
/* 1 */
outline-offset: -2px;
/* 2 */
}
/*
Remove the inner padding in Chrome and Safari on macOS.
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */
}
/*
Add the correct display in Chrome and Safari.
*/
summary {
display: list-item;
}
/*
Removes the default spacing and border for appropriate elements.
*/
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
margin: 0;
}
fieldset {
margin: 0;
padding: 0;
}
legend {
padding: 0;
}
ol,
ul,
menu {
list-style: none;
margin: 0;
padding: 0;
}
/*
Reset default styling for dialogs.
*/
dialog {
padding: 0;
}
/*
Prevent resizing textareas horizontally by default.
*/
textarea {
resize: vertical;
}
/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/
input::-moz-placeholder, textarea::-moz-placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
input::placeholder,
textarea::placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
/*
Set the default cursor for buttons.
*/
button,
[role="button"] {
cursor: pointer;
}
/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
cursor: default;
}
/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
This can trigger a poorly considered lint error in some tools but is included by design.
*/
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block;
/* 1 */
vertical-align: middle;
/* 2 */
}
/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/
img,
video {
max-width: 100%;
height: auto;
}
/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden] {
display: none;
}
*, ::before, ::after {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
--tw-skew-x: 0;
--tw-skew-y: 0;
--tw-scale-x: 1;
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-gradient-from-position: ;
--tw-gradient-via-position: ;
--tw-gradient-to-position: ;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgb(59 130 246 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-drop-shadow: ;
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
}
::backdrop {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
--tw-skew-x: 0;
--tw-skew-y: 0;
--tw-scale-x: 1;
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-gradient-from-position: ;
--tw-gradient-via-position: ;
--tw-gradient-to-position: ;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgb(59 130 246 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-drop-shadow: ;
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
}
.block {
display: block;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 938 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 521 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 598 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Some files were not shown because too many files have changed in this diff Show More