ProductPromotion
Logo

Go.Lang

made by https://0x3d.site

GitHub - ok-borg/borg: Search and save shell snippets without leaving your terminal
Search and save shell snippets without leaving your terminal - ok-borg/borg
Visit Site

GitHub - ok-borg/borg: Search and save shell snippets without leaving your terminal

GitHub - ok-borg/borg: Search and save shell snippets without leaving your terminal

BORG – Search and save shell snippets without leaving your terminal

cruft guaranteed Travis CI Go Report Card Slack Status

Borg was built out of the frustration of having to leave the terminal to search and click around for bash snippets. Glance over multiple snippets quickly with Borg's succinct output.

PLEASE READ: The website (https://ok-b.org) is down, because I didn't have time to maintain it. You can host borg yourself, and we plan to resurrect the version hosted by us on 1backend (https://github.com/1backend/1backend). The ETA for this is a couple of months.

Search

borg "list only files"
(1) Bash: How to list only files?
        [a] find . -maxdepth 1 -type f
        [b] ls -l | egrep -v '^d'
            ls -l | grep -v '^d'

(2) List only common parent directories for files
        [a] # read a line into the variable "prefix", split at slashes
            IFS=/ read -a prefix
            # while there are more lines, one after another read them into "next",
            # also split at slashes
            while IFS=/ read -a next; do
                new_prefix=()
                # for all indexes in prefix
                for ((i=0; i < "${#prefix[@]}"; ++i)); do
                    # if the word in the new line matches the old one
                    if [[ "${prefix[i]}" == "${next[i]}" ]]; then
        ...

Use borg pipeto less to pipe the results straight to less (or another program).

Can't find what you are looking for? Be a good hacker and contribute your wisdom to the hive mind by tweaking existing snippets and adding your own.

Install

The following releases only let you search snippets. To add or edit snippets, install from source. Releases are coming soon.

brew install borg

For Linux, download a release manually:

wget https://github.com/ok-borg/borg/releases/download/v0.0.3/borg_linux_amd64 -O /usr/local/bin/borg
chmod 755 /usr/local/bin/borg

Same for Mac:

wget https://github.com/ok-borg/borg/releases/download/v0.0.3/borg_darwin_amd64 -O /usr/local/bin/borg
chmod 755 /usr/local/bin/borg

Rate results: worked

When a result works for you, use the worked command to give feedback:

borg worked 12

This will rank the result higher for similar queries—especially helpful when a good result was buried in the search results.

Advanced usage

For more commands and their explanations, please see advanced usage.

How does borg work?

The client connects to a server at ok-b.org. You can host your own server too (see daemon folder), though self-hosting will become less appealing once people start contributing their own content to the database.

UI explanation

  • () denotes hits for your query
  • [] denotes snippets found for a given query
  • ... under a [] means more lines to display (use the -f flag for full display, see more about usage below)

Credits

The borg mascot has been delivered to you by the amazing Fabricio Rosa Marques.

Community

Articles
to learn more about the golang concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about GoLang.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory