All Projects → ok-borg → Borg

ok-borg / Borg

Licence: apache-2.0
Search and save shell snippets without leaving your terminal

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to Borg

Corgi
Corgi is a command-line workflow manager that helps with your repetitive command usages by organizing them into reusable snippet
Stars: ✭ 365 (-76.11%)
Mutual labels:  command-line-tool, snippets
Silicon
Create beautiful image of your source code.
Stars: ✭ 1,761 (+15.25%)
Mutual labels:  snippets
Unitylibrary
📚 Library of all kind of scripts, snippets & shaders for Unity
Stars: ✭ 1,968 (+28.8%)
Mutual labels:  snippets
Embedme
Utility for embedding code snippets into markdown documents
Stars: ✭ 113 (-92.6%)
Mutual labels:  snippets
Laravel 5 Snippets
Laravel 5 Snippets for Sublime Text
Stars: ✭ 110 (-92.8%)
Mutual labels:  snippets
Custom Calendar View
The CustomCalendarView provides an easy and customizable calendar to create a Calendar. It dispaly the days of a month in a grid layout and allows to navigate between months
Stars: ✭ 113 (-92.6%)
Mutual labels:  snippets
N26
API and CLI to get information of your N26 account
Stars: ✭ 107 (-93%)
Mutual labels:  command-line-tool
Python N26
💵 Unofficial Python client for n26 (Number 26) - https://n26.com/
Stars: ✭ 116 (-92.41%)
Mutual labels:  command-line-tool
Droid
A command-line tool for checking Android OS version history written by Rust.
Stars: ✭ 115 (-92.47%)
Mutual labels:  command-line-tool
Endlines
Easy conversion between new-line conventions
Stars: ✭ 112 (-92.67%)
Mutual labels:  command-line-tool
Jardiff
A tool for comparing JAR files, including Scala pickled signatures and method code
Stars: ✭ 112 (-92.67%)
Mutual labels:  command-line-tool
Nix Deploy
Deploy software or an entire NixOS system configuration to another NixOS system
Stars: ✭ 111 (-92.74%)
Mutual labels:  command-line-tool
Git Chglog
CHANGELOG generator implemented in Go (Golang).
Stars: ✭ 1,895 (+24.02%)
Mutual labels:  command-line-tool
Splash
A fast, lightweight and flexible Swift syntax highlighter for blogs, tools and fun!
Stars: ✭ 1,529 (+0.07%)
Mutual labels:  command-line-tool
Foundationextension
Foundation/Cocoa/UIKit extension kit. Reference document:
Stars: ✭ 115 (-92.47%)
Mutual labels:  snippets
Lh Cpp
C&C++ ftplugins suite for Vim
Stars: ✭ 108 (-92.93%)
Mutual labels:  snippets
Rose
Simple PHP search engine that supports Russian and English morphology
Stars: ✭ 111 (-92.74%)
Mutual labels:  snippets
Itnotes
个人笔记,IT相关。
Stars: ✭ 113 (-92.6%)
Mutual labels:  snippets
Elixir cli spinners
Spinnig Animations for Command Line Applications
Stars: ✭ 117 (-92.34%)
Mutual labels:  command-line-tool
Mesabox
A collection of core system utilities written in Rust for Unix-like systems (and now Windows)
Stars: ✭ 116 (-92.41%)
Mutual labels:  command-line-tool

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].