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

feat: use new theme for the website

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
This commit is contained in:
2025-01-01 23:39:45 +05:30
parent 1bb34a512a
commit 62efd95607
140 changed files with 78 additions and 10518 deletions
@@ -0,0 +1,231 @@
---
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.
@@ -0,0 +1,406 @@
---
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
@@ -0,0 +1,37 @@
---
title: Installing Fedora with automatic and custom partioning
date: 2023-01-19T23:02:00
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
@@ -0,0 +1,301 @@
---
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
@@ -0,0 +1,280 @@
---
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-31T23:19:00
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)
+172
View File
@@ -0,0 +1,172 @@
---
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)
+92
View File
@@ -0,0 +1,92 @@
---
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.
@@ -0,0 +1,247 @@
---
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/)
@@ -0,0 +1,4 @@
---
title: Setup Remark42 from scratch on Oracle Cloud
draft: true
---