algo.sh is a search engine for algorithms. It uses cht.sh in the background, a cheatsheet tool for terminal. Found entries are returned in pages. Each entry is a cheatsheet item (e.g. an instance for an algorithm) written by real individuals. For integration (.i.e atom, vim), you may check algo.sh API
We need your help. algo.sh requests entries from cht.sh for now. However, the entries may contain inaccurate results. Depending on your connection speed, the results may return slow (.i.e searching for an entry using a search engine). There are more features we want to add. Therefore, Please consider contributing to the project. Refer to Contributing part for more information.
The extension requires PostgreSQL. After downloading the extension and PostgreSQL, create a .env
file with the
contents
PGUSER=[pgusername]
PGPASSWORD=[pgpassword]
PGDATABASE=algo
PGTABLE=[tablename]
pgusername
and pgpassword
are your postgres user's user name and password. You can write any tablename
you want. The commands below are necessary before using the extension, because
postgres service may be disabled for default. To enable the
service for Windows:
tc start [postgresServiceName]
For MacOS
launchctl start [postgresServiceName]
For Linux; temporarily
systemctl start [postgresServiceName]
For Linux; permanently
systemctl enable [postgresServiceName]
Note that the extension is tested in Ubuntu Linux only. Nodejs and vscode API are cross-compatible; however, the commands above are not tested in platforms other than Ubuntu Linux. For Ubuntu/Debian users,
postgresServiceName
ispostgresql.service
.
- Open the extension by clicking the logo on the left on the sidebar.
- Type the cheatsheet you want to search for, then choose the language from the dropdown menu
- Click Search button
- Results will appear, scroll and enjoy :)
It is simple. Steps:
- Open an issue
- If you are allowed, commit your changes
- Wait your changes to be published
Do not dm spam our contributors please.
We want to create our own database from scratch. However, it is a daunting job. There are millions of algorithms to consider. Large is formed little by little. Please send an implementation for an algorithm as plain text in steps below.
- Open an issue with the label
entry
. The title should be the name of your algorithm. - Copy-paste your text and submit
Things to consider:
- Be sure that you use comments to make the text informative. Please
use directives like
@param
and@return
in Javascript for your functions. - Languages like python and Javascript let expressions run in the global scope. Please avoid that. You may use global variables.
- Give your main function the name of the algorithm. This function will most likely be called by the user.
- When you are done, your work will look like below
...
FUNCTIONS AND GLOBAL VARIABLES WITH INFORMATIVE COMMENTS
...
<WORK> (c) by <AUTHOR(S)>
<WORK> is licensed under a
Creative Commons Attribution-ShareAlike 4.0 International License.
You should have received a copy of the license along with this
work. If not, see <http://creativecommons.org/licenses/by-sa/4.0/>
Don't be discouraged by that :D. We will fix minor parts of your text according to the guidelines mentioned above.
This extension contributes the following settings:
algo-sh.load
: Specifies how many code blocks to load in a pagealgo-sh.highlight
: Specifies the highlight theme for rendering code
- No issues yet
- Alpha release
- Change license (from MIT to GPLv3)
- Configure icon for marketplace
-
Entries from cht.sh
-
Codebase from @Dj-Polyester
-
Spinning wheel animation by Sergio Lozano from www.lottiefiles.com