Giter Club home page Giter Club logo

bro's Introduction

Alfi Maulana



A C++ enthusiast who is experienced with building and optimizing native apps on Linux, macOS, and Windows. Also, a fast learner and generalist who can develop multiple things like computer vision programs using OpenCV, shell scripts for CI workflows, web apps using TypeScript, and microservices using Go.

My Works

Aside from my current job, I also work on several personal projects. Currently, most of these projects are GitHub repository templates and GitHub Actions for utilizing my other projects. Please refer to my repositories for a list of all projects that I have done.

C++ Projects

CMake Projects

Node.js Projects

GitHub Actions Projects

GitHub Composite Actions Projects

Other Projects

  • Project Starter: A minimalistic GitHub repository template to kickstart your project.
  • Python Starter: A minimalistic GitHub repository template to kickstart your Python project.
  • LeetSpace: A dedicated workspace and archive for my LeetCode submissions.
GitHub contribution animation

bro's People

Contributors

dependabot[bot] avatar lordronz avatar threeal avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

lordronz

bro's Issues

Replace Env Var With JSON Config

Replace BRO_ADDR environment variable with a JSON config file.

  • BRO_ADDR environment variable is deprecated, modify the README.md too.
  • The JSON config is in:
    • ~/.bro/backend_config.json for the backend server, it contains the following field:
      • listen_addr, listen address for the backend server, defaults to null.
    • ~/.bro/config.json for the CLI client, it contains the following field:
      • backend_addr, backend address for used by the CLI client, defaults to null.
  • On running, both the backend server and the CLI client it will do the following:
    • Check if JSON file exists, load if exists, else create a new file.
    • then, for backend server, if listen_addr is null, ask prompt from the user to input the listen address, if user does not input anything, it will be defaults to :320, save config.
    • the same apply for the CLI client, backend_addr, and localhost:320.

Pass Logs to a Database

Use file based database (maybe sqlite?).

  • Put database in ~/.bro/log.db (this one only store logs).
  • Modify log functions (log.Printf, log.Fatalf, etc.) so it could pass logs to that database.

The logs will be stored for each session (start -> exit), so there are two tables:

  • List of session.
  • List of logs.

The logs at least should store the following data:

  • Time.
  • Session Id.
  • Topic (could be empty for now).
  • Content.

While session for now just store start time of the session.

Rename Commands

Rename the following commands:

  • client -> bro.
  • backend -> bro-backend.

Modify guide in the README.md too.

Fix Help Command In Bro Client

Currently bro client does not show any command when running bro --help.

image

It's possibly happen because we use flag package but doesn't specify flag like what it normally should do.
Maybe using other package could fix this too?

Add Systemd Config

  • Add a systemd config for backend server in this project under service/threeal-bot.service.

    See this for an example of systemd config.

  • Add a bash script to install and uninstall that config.

    Install simply means copy service/threeal-bot.service to /lib/systemd/system/.

Bro Backend Status Command

Add a status command in the Bro Backend for checking if service of Bro Backend is running.

  • This command is available on Linux only. See this.
  • This command check if:
    • The config file is exist.
    • The service is running.

Bro Config Should Save Default Value

Bro config should save the default value after we just press the enter during config prompt.
This way we will only be asked once, only during the initialization of config file.

image

Bro Backend Add Spin Command

Add spin command to run Bro backend process.
So running Bro backend now will use bro-backend spin instead of just bro-backend.

Also, add --help option in bro-backend to list all available options and commands.
image

Add Config Command

Add a config command in both bro and bro-backend cmds.

It will work as follow:

  • bro config listen_addr, will output current value for listen_addr.
  • bro config listen_addr 12130, will overwrite value for listen_addr to 12130.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.