GithubHelp home page GithubHelp logo

lionkor / inspire Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 45 KB

a simple command-line idea collection tool

License: GNU General Public License v2.0

CMake 1.96% C 97.32% Shell 0.72%
unix unix-command ideas

inspire's Issues

Ideas in quotes should be stored without quotes

If someone were to add ideas containing tokens used by bash or a similar shell, such as $HOME, they should put the entire idea in quotes. In this case, however, we should ignore the quotes when storing the idea.

Add a way to remove ideas from the list

Currently the workaround is to edit $HOME/.inspire/data, but this should at least be somewhat easier to find. Just printing the path with a command like inspire file would make inspire file | vim possible and solve the issue (somewhat).

An option to "reply" to the output of inspire give to say "please remove this one from the list" would be best.

Ensure that inspire doesn't read an invalid data file

Currently, the $HOME/.inspire/data file could be replaced by anything, like a symlink to a huge file. This is kind of dangerous, and I don't see why we would load arbitrary files. This could be used to OOM the system, for whatever reason one might do this.

One way to fix this is to choose some random number like 500MB and assume that this is will never OOM the system, then stat the file before we read it to make sure that it's not larger than that (which would be a ridiculous amount of ideas).

Another way to fix this is to add a header to the file head. You could still OOM by appending a large amount of data, but the original problem would be fixed.

Now this problem seems ridiculous and this is an edge case that will never happen, but I feel like this is easy to implement, and its good to make this program as solid as possible.

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.