hubsmoke / bro Goto Github PK
View Code? Open in Web Editor NEWA CLI to interact with bropages.org
Home Page: bropages.org
License: Other
A CLI to interact with bropages.org
Home Page: bropages.org
License: Other
I think it would help to add the ruby-dev package as a dependency on the homepage. When I installed on 16.04 Ubuntu I needed that dependency.
Did apt install ruby
. Then:
orschiro@x230:~$ gem install bropages
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.3.0 directory.
orschiro@x230:~$ sudo gem install bropages
Building native extensions. This could take a while...
ERROR: Error installing bropages:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/unf_ext-0.0.7.4/ext/unf_ext
/usr/bin/ruby2.3 -r ./siteconf20171123-20103-ihn6s4.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/unf_ext-0.0.7.4 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/unf_ext-0.0.7.4/gem_make.out
I propose a double-hash be used, to indicate inline comments.
Command ## Comment
http://bropages.org/examples/1717
^ this would look so much better if you could do
%A ## Weekday. Monday
%a ## Weekday, abbreviated. Mon
%d ## Day of month, padded. 03
Much more concise for quick blurbs of text,
instead of all that wasted whitespace filling up your screen.
..../.rvm/gems/ruby-2.3.1/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::TimeoutError is deprecated
The bro command isn't in our database.
* Typing bro add will let you add bro to our database!
* There's nothing to lose by typing bro add, it will just launch an editor with instructions.
* Need help? Visit http://bropages.org/help
This error is thrown for any query
Every time I run bro
I get the following message:
➜ ~ bro git
/usr/local/lib/ruby/gems/2.4.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::NIL is deprecated
/usr/local/lib/ruby/gems/2.4.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::TRUE is deprecated
/usr/local/lib/ruby/gems/2.4.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::FALSE is deprecated
/usr/local/lib/ruby/gems/2.4.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::Fixnum is deprecated
/usr/local/lib/ruby/gems/2.4.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::Bignum is deprecated
32 entries for git -- submit your own example with "bro add git"
...
Bro still works, but I'd like to suppress this message if possible.
I'm running macOS Sierra v10.12.2. I don't get this error on my other Mac running El Capitan.
I've tried gem update
, gem cleanup
, uninstalling bropages and reinstalling, and updating rubygems itself, but I'm still getting this error.
Thanks!
If I’m not connected, the error message says eg
The command 'xargs' isn’t in our database.
when in fact it is.
For example, when the user enters bro with no arguments, list all available commands after the instructions.
Bro v0.1.0
Ubuntu 12.04
My home dir is: /home/a
/var/lib/gems/1.8/gems/highline-1.6.20/lib/highline/system_extensions.rb:214: warning: Insecure world writable dir /home/a in PATH, mode 040777
This warning appears for a brief moment before the listing is displayed. It then appears again in the listing itself. It appears for every listing. Here is an example of the text using: bro bro
4 entries for bro -- submit your own example with "bro add bro"
/var/lib/gems/1.8/gems/highline-1.6.20/lib/highline/system_extensions.rb:214: warning: Insecure world writable dir /home/a in PATH, mode 040777
# lookup an entry for the command 'bro' with bro
bro bro
bro thanks to upvote (97)
bro ...no to downvote (3)
...........................................................................
....etc....
My home directory exists like this purposefully:
$ ll -d /home/a
drwxrwxrwx 176 a a 32768 Jan 28 22:08 /home/a
I get an error:
/usr/lib/ruby/2.1.0/rubygems/dependency.rb:298:in
to_specs': Could not find 'commander' (= 4.1.5) - did find: [commander-4.2.0] (Gem::LoadError)`
I am running under Arch Linux (downloaded newest commander as a dependency). Is it possible to fix this for newer dependency versions?
This makes bro not work. This makes me sad.
If you try to lookup a command such as add-apt-repository
by running
bro add-apt-repository
it opens the editor to create an entry for this command rather than looking it up. The correct behaviour can be obtained by running bro lookup add-apt-repository
but the actual behaviour is certainly not what is expected. Common patterns like bro -- add-apt-repository
(the --
is often used to indicate the end of arguments) do not do the correct thing either.
When I try installing:
~$ gem install bropages
Building native extensions. This could take a while...
ERROR: Error installing bropages:
ERROR: Failed to build gem native extension.
No such file or directory @ dir_chdir - /Users/christian/.gem/gems/unf_ext-0.0.6/ext/unf_ext
Gem files will remain installed in /Users/christian/.gem/gems/unf_ext-0.0.6 for inspection.
Results logged to /Users/christian/.gem/extensions/x86_64-darwin-13/2.2.0-static/unf_ext-0.0.6/gem_make.out
~$ ruby --version
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin13]
~$ gem --version
2.4.5
It's quite unfortunate that there are two projects splitting the mindshare of easily approachable, community-maintained quick reference documents for console commands, tldr and bropages.
Wouldn't be nice if the communities joined forces? Leave your comments at tldr-pages/tldr#266 if you're interested!
:P
Some of us crazy folks like to edit everything with Sublime Text, nano, pico or something that isn't as pointless to learn as vi.
Please open the editor stored under the editor system variable instead of forcing the usage of a editor that might not even be installed on the system.
It would be useful to be able to configure the results that get returned by filtering out anything with excessive downvote to upvote ratios. For example, look at the output from bro rm
.
The configuration file should be ~/.config/.bro
, and not directly ~/.bro
.
http://bropages.org/ states that
bro is meant to work out of the box for any machine running Ruby 1.8.7+
However, when I try to install bropages on my Mac (running Ruby 1.8.7), I get the following error:
$ gem install bropages
Fetching: json_pure-1.8.1.gem (100%)
Fetching: highline-1.6.20.gem (100%)
Fetching: commander-4.1.5.gem (100%)
Fetching: mime-types-2.1.gem (100%)
ERROR: Error installing bropages:
mime-types requires Ruby version >= 1.9.2.
It looks bropages is dependent on mime-types, and that requires 1.9.2.
Just FYI.
bro
doesn't work at work, where I'm behind a company proxy. Does bro
respect the proxy environment variables?
Any bro command after installation results in:
/var/lib/gems/2.5.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::NIL is deprecated
/var/lib/gems/2.5.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::Data is deprecated
/var/lib/gems/2.5.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::TRUE is deprecated
/var/lib/gems/2.5.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::FALSE is deprecated
/var/lib/gems/2.5.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::Fixnum is deprecated
/var/lib/gems/2.5.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::Bignum is deprecated
Running bropages using ruby 2.1.0p0 with ruby-mime-types 2.1 spits out the following error:
/usr/lib/ruby/2.1.0/rubygems/specification.rb:1292:in
block in activate_dependencies':
can't satisfy 'mime-types (~> 1.19.0)', already activated 'mime-types-2.1'
(Gem::LoadError)`
In some cases, bro
is giving many examples that are equal or very close. I propose a new feature where users can use the command
bro get it together 3 2
to suggest merging entry 2 into 3.
For example; The curl command isn't in our database.
Is there a way I can troubleshoot the issue? I have made sure I'm on the most recent version of gem/ruby and bro and I have verified that there are no network issues.
Currently bropages.org
is not listening on 443
bropages.org
should have TLS and the gem should default to using it
A lot of people are upset about the name, to put it mildly.
I don't want to get into a debate about whether people should or shouldn't be upset. That conversation should happen in better places than the github issue tracker. I'll just note that it might be a good PR move to rename it. Would you consider that?
If not, I might just fork it and republish with a new name as a devious plan to get a popular project with minimum work :-) But I'd rather you keep the credit since you did the actual work.
Either way, great job building this useful tool and thanks for releasing it.
According the website
"bro is meant to work out of the box for any machine running Ruby 1.8.7+"
When trying to install on Ubuntu 12.04 LTS, this result:
# gem install bropages
Fetching: json_pure-1.8.1.gem (100%)
Fetching: highline-1.6.20.gem (100%)
Fetching: commander-4.1.5.gem (100%)
Fetching: mime-types-2.1.gem (100%)
ERROR: Error installing bropages:
mime-types requires Ruby version >= 1.9.2.
Just a heads up -- I wrote a quick Python client (because I'm a Python bro, not a Ruby bro).
Currently read-only, but PRs welcome.
Bro (v 0.1.0) installed (OSX 10.12.3), but no matter what bro I try, the result is always:
The bro command isn't in our database
The curl command isn't in our database
The ping command isn't in our database
... you get the point.
As bro gets more used, it's going to be more difficult to parse the output. It'd be nice to be able to limit the number of examples either by just an absolute number, or by some score threshold. This will hide the crap that accumulates.
Hey, Bro is great! Thanks for making this product. It would be nice though if Bro had a more minimal output where the upvotes/downvotes took up less of the screen space.
At least for my own entries I would like to have something like bro edit command
to correct errors or fix formatting issues.
I have not found a license after a cursory search for one in the repository, on the website, and at rubygems.org. Before installing any software on my computer, I want to know what license it uses.
If you have no specific license in mind, I recommend something non-restrictive (i.e. a copyfree license). The "official" reference implementation of the Ruby programming language itself uses the (two-clause) Simplified BSD License. Perhaps you could use that.
They shouldn't be there.
They shouldn't be there at all! 😄
I tried to sign up through the CLI to rate bro pages using an address of the form [email protected]. I received the verification code from the server, but when I entered it into the terminal, it was rejected repeatedly.
Repeating the exact same process without the plus ([email protected]), everything worked smoothly.
Low priority bug definitely, but some people like sorting the addresses they give out.
Hi,
Add, the ability to generate the output in markdown. That way you can create a nice manual 😃
This can be achieved by making small changes.
$ ack --ruby -R 'foo'
bro thanks to upvote (9)
bro ...no to downvote (0)
bro wasn't working for me and I had no idea why. The only output I got was:
The bro command isn't in our database.
* Typing bro add will let you add bro to our database!
* There's nothing to lose by typing bro add, it will just launch an editor with instructions.
* Need help? Visit http://bropages.org/help
It turns out that there was a valuable Netrc::Error
exception being thrown away:
Permission bits for '/Users/huyz/.netrc' should be 0600, but are 644
The exception handling at
Lines 251 to 253 in b2fbbc1
RestClient::ResourceNotFound
exceptions separately.Just like apropos, "sis" would list the commands whose bro entries contain the specified keywords.
Example:
sis reverse
Output:
rev
revnetgroup
You could then use "bro rev" to find the example containing "reverse".
In addition to being complementary to bro, this sister command might even ease some of the naming complaints we've seen.
Hi, thanks for making this :) I'd like to download all of the bropages in order to do some analysis. I could scrape the website, but I wonder if you can share this data in a 'dump' form or even if the tool itself can cache the whole database so I can extract it from there. Thanks
$ bro bro $ bro no Bropages.org requires an email address verification to do this What's your email address? ^C/Library/Ruby/Gems/2.0.0/gems/highline-1.6.20/lib/highline.rb:863:in `eof?': Interrupt from /Library/Ruby/Gems/2.0.0/gems/highline-1.6.20/lib/highline.rb:863:in `get_line' from /Library/Ruby/Gems/2.0.0/gems/highline-1.6.20/lib/highline.rb:885:in `get_response' from /Library/Ruby/Gems/2.0.0/gems/highline-1.6.20/lib/highline.rb:260:in `ask' from /Library/Ruby/Gems/2.0.0/gems/bropages-0.0.15/lib/bro/bro_state.rb:32:in `prompt_email' from /Library/Ruby/Gems/2.0.0/gems/bropages-0.0.15/lib/bro/bro_state.rb:21:in `rescue in check_email' from /Library/Ruby/Gems/2.0.0/gems/bropages-0.0.15/lib/bro/bro_state.rb:18:in `check_email' from /Library/Ruby/Gems/2.0.0/gems/bropages-0.0.15/lib/bro.rb:78:in `block (2 levels) in ' from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/command.rb:180:in `call' from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/command.rb:180:in `call' from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/command.rb:155:in `run' from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/runner.rb:402:in `run_active_command' from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/runner.rb:66:in `run!' from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/delegates.rb:7:in `run!' from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/import.rb:10:in `block in '
Tried:
bro add "<command>" -m "<message">
And I get:
invalid option: -m
Bro has a strongly negative connotation with many people. Google brogrammer.
I propose a name change to "TLDR".
Downside:
It is one more char.
Upside:
no popped collars.
The "bro thanks", "bro no" messages are very repetitive and take up a lot of space. It'd be far more useful if it only gave the instruction once and just numbered the examples.
Additionally I'd be more inclined to "vote" if I could simply type "bro no x" without the dots.
One entry for rm
has this example:
sudo rm -rf /
There should be a vote as dangerous
option in addition to thumbs down.
A default install could hide all dangerous items, and additionally a user could set a dangerous vote threshold =P
as stated on the website:
bro is meant to work out of the box for any machine running Ruby 1.8.7+
however, I face the following difficulties (running OS X 10.8.5):
097115 on Talisker @ ~/Desktop> ruby --version
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
097115 on Talisker @ ~/Desktop> sudo gem install bropages
ERROR: Error installing bropages:
mime-types requires Ruby version >= 1.9.2.
would be grateful for any advice,
thanks.
Trying to bro anything results in the exact same error (below). I've done a full gem update.
$ bro bro
/Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/runner.rb:365:in `block in require_program': program version required (Commander::Runner::CommandError)
from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/runner.rb:364:in `each'
from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/runner.rb:364:in `require_program'
from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/runner.rb:52:in `run!'
from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/delegates.rb:11:in `run!'
from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/import.rb:10:in `block in <top (required)>'
/Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require': dlopen(/Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.4.0/openssl.bundle, 9): Library not loaded: /opt/local/lib/libssl.1.0.0.dylib (LoadError)
Referenced from: /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.4.0/openssl.bundle
Reason: image not found - /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.4.0/openssl.bundle
from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl.rb:17:in `<top (required)>'
from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/https.rb:22:in `<top (required)>'
from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient.rb:6:in `<top (required)>'
from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/rest-client.rb:2:in `<top (required)>'
from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/bropages-0.0.15/lib/bro.rb:7:in `<top (required)>'
from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/bropages-0.0.15/bin/bro:3:in `<top (required)>'
from /Users/mark/.rvm/gems/ruby-1.9.3-p194/bin/bro:19:in `load'
from /Users/mark/.rvm/gems/ruby-1.9.3-p194/bin/bro:19:in `<main>'
from /Users/mark/.rvm/gems/ruby-1.9.3-p194/bin/ruby_executable_hooks:15:in `eval'
from /Users/mark/.rvm/gems/ruby-1.9.3-p194/bin/ruby_executable_hooks:15:in `<main>'
mark@lotus:~$ vim /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/bropages-0.0.15/bin/bro
terminal 1 ~ $ bro join
terminal 2 ~ $ bro lam
terminal 1 ~ $ bro thanks
that index (1) is not available for 'lam'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.