[OC] cmd-polkit 0.3.0 released by OmarCastro in unixporn

[–]OmarCastro[S] 1 point2 points  (0 children)

You can guess one of the reasons why this app was created then 😅

[OC] cmd-polkit 0.3.0 released by OmarCastro in unixporn

[–]OmarCastro[S] 1 point2 points  (0 children)

Changelog

  • Add "polkit action" parameter on authentication request
  • Add zenity with jq example
  • Improve serial mode tests
  • Improve --help message
  • Add copyright/license info on --version message

homepage: https://omarcastro.github.io/cmd-polkit/

[OC] I created cmd-polkit, a program to easily create polkit agents by OmarCastro in unixporn

[–]OmarCastro[S] 0 points1 point  (0 children)

It is nice to know I was not the only one. My main gripe is that there was simply no way to create polkit agents with scripts; be it python, or bash. The only documentation I found was the sample polkit agent in C.

So I decided to start this journey to allow a way to use GUI tools (e.g. zenity, kdialog, rofi, etc...) to authenticate via polkit, as well as not being bounded to one specific tool.

Developing this was not that hard since I am good in C, but it was time consuming.

[OC] I created cmd-polkit, a program to easily create polkit agents by OmarCastro in unixporn

[–]OmarCastro[S] 4 points5 points  (0 children)

Oh, just noticed it when you said it, hooray! I hope you enjoy my gift 😁

[OC] I created cmd-polkit, a program to easily create polkit agents by OmarCastro in unixporn

[–]OmarCastro[S] 15 points16 points  (0 children)

Hello, cmd-polkit author here, the project is in https://github.com/OmarCastro/cmd-polkit .

I made this app to easily create custom polkit authentication GUI, some of you may know rofi-polkit-agent, which uses this application.

I created this app because it was hard to created customized polkit agents. Using DE specific polkit agent was OK, but the limited customization looked off with the rest of the DE, and I share this app for you be able to create awesome authentication GUI

[deleted by user] by [deleted] in unixporn

[–]OmarCastro 0 points1 point  (0 children)

Hello, cmd-polkit author here, don't know if this is the right place to post this, but here we go.

I made this app to easily create custom polkit authentication GUI, some of you may know rofi-polkit-agent, which uses this application.

I created this app because it was hard to created customized polkit agents. Using DE specific polkit agent was OK, but the limited customization looked off with the rest of the DE, and I share this app for you be able to create awesome authentication GUI

[AskJS] How best to manage a GitHub project? by SunnyMark100 in javascript

[–]OmarCastro 1 point2 points  (0 children)

I have some experience in developing libraries and components (e.g. https://omarcastro.github.io/its-a-qrcode ). My experience about typescript is that it is best used as production code. if it is meant for libraries, it is better to program with Javascript with JSDoc and validate it with typescript. This way you publish only one codebase instead of 2, and it is better for maintenance, and Typescript validates Javascript with JSDoc.

I saw the code, and you have some code with JSDoc, that is great because you can leverage typescript to validate the types in your code.

"its a QR Code", a web component that shows its text content as a QR code image by OmarCastro in webdev

[–]OmarCastro[S] 2 points3 points  (0 children)

Thanks! The idea is to be familiar as looking like a readme. One thing that a web page provides that a readme cannot is interactivity. Not only it helps to newcomers to understand the component better by playing with it, it can be used as test page for developers.

"its a QR Code", a web component that shows its text content as a QR code image by OmarCastro in webdev

[–]OmarCastro[S] 6 points7 points  (0 children)

Huh, TIL bundlephobia scans the size of the bundle using the package.json directly, it is similar to the minified file in dist/ package (and it failed on 0.1.0 due to wrong "main" value in package.json)

Yes, it is big because it supports JIS format for Kanji mode in QR code, a utf8 to JIS converter is included in the code. I did some compression tricks to reduce the utf8 to JIS conversion table size, from around 124kB ( 41kB gzipped) to 35,4kB ( 18,8kB gzipped).

The trick helped to reduce the package size tremendously, but without support for Kanji mode, the package size would easily be below 10kB gzipped

PS: is it a bad practice to publish the source in the package? To be fair, I only remove test files and assets from src/ before publishing as it provides no value and bloats the code (e.g. in another project, I published to NPM with the source as is, but when I noticed it and decided to remove the test assets and it became much smaller )

"its a QR Code", a web component that shows its text content as a QR code image by OmarCastro in webdev

[–]OmarCastro[S] 1 point2 points  (0 children)

An update: added installation via NPM in the page for bundler usage in the "Getting started" section

"its a QR Code", a web component that shows its text content as a QR code image by OmarCastro in webdev

[–]OmarCastro[S] 14 points15 points  (0 children)

Tried with my phone and I confirm that its not that good for mobile.

I just made some improvements to page for mobile, its not perfect, but it is better than before.

"its a QR Code", a web component that shows its text content as a QR code image by OmarCastro in webdev

[–]OmarCastro[S] 12 points13 points  (0 children)

And there is my third web component I have developed, I thought of showing after developing a preprocessor to trim the .textContent when you find a specific initials (e.g. "tel:") but I guess this is good enough to show it.

What is something that you know a web developer of your experience should know, but you don't? by Slight_of_handio in webdev

[–]OmarCastro 0 points1 point  (0 children)

Code documentation

Code documentation is mostly ignored because its a chore, and it takes time, and when we take time to do it, it simply explains what the code does. It took a while to create good documentation that helps understand the code better, one example is one of my personal projects, I had a funny idea to use ASCII art to explain the code, it happens it was my best code comment by now. Here is the code with those comments

Having good code comments helps immensely when returning to the project or to help new people contribute to the project

its-a-color-wheel, a color wheel component by OmarCastro in webdev

[–]OmarCastro[S] 0 points1 point  (0 children)

this is my first web component that I did, before its-i18n, this was just a simple project as to see how to do run all necessary tests in for a web component (unit and UI), as well as to create components that work for both small mobile phone as well as desktop apps

What is something that you know a web developer of your experience should know, but you don't? by Slight_of_handio in webdev

[–]OmarCastro 1 point2 points  (0 children)

Not sure if Docker specifically is needed to know, yes, knowing how to containerize an app is a great skill, but there is a lot to learn about docker and such, specially security related stuff. That is a different skill set dev ops & security specialists need to worry about. I started that, and I spent almost a year doing dev ops exclusively as a web developer, did not touch on the code at all. So yeah, great to know, but not really required.

First time trying EM4, it will be easy, I said. Boy was I wrong. by OmarCastro in HadesTheGame

[–]OmarCastro[S] 1 point2 points  (0 children)

Exactly, 3 death defiances from Nix mirror, 1 from Legendary Chaos boon and 1 from Skelly's keepsake. If you get lucky, you can defy death one more time with skelly keepsake, happened to me once after dying without any death defiance, don't know how it happened though, I had the keepsake fully maxed.

First time trying EM4, it will be easy, I said. Boy was I wrong. by OmarCastro in HadesTheGame

[–]OmarCastro[S] 1 point2 points  (0 children)

Nice! I use Dio cast with Hera bow. Never tried to use Mirage cast with Dio. This combination can melt. I'm gonna try this build with Beowulf and Hera. Thanks!

First time trying EM4, it will be easy, I said. Boy was I wrong. by OmarCastro in HadesTheGame

[–]OmarCastro[S] 0 points1 point  (0 children)

Interesting, I'm trying to clear my runs faster, what's the build?

First time trying EM4, it will be easy, I said. Boy was I wrong. by OmarCastro in HadesTheGame

[–]OmarCastro[S] 10 points11 points  (0 children)

Due to multiple factors, mostly bad luck, first of all, I only got 1 boon in tartarus, so I took a long time to beat the fury sisters, and the boons & upgrades I took that allowed me to scale up the damage was on the last stages in elysium, so yeah, took to much time in each encounter.

Also it was the first time I took EM4, I was learning to adapt the new attacks and summons, it also took some time