botherbother 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/botherbother +4 -0
  2. data/lib/botherbother.rb +60 -0
  3. metadata +50 -0
data/bin/botherbother ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'botherbother'
4
+ puts bother
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Credits:
4
+ # Many tips from:
5
+ # https://www.shell-tips.com/sheets/bash_help_sheet.jpg
6
+ # http://www.howtoforge.com/useful_linux_commands
7
+ # Name from Megan Baker
8
+
9
+ # I encourage you to look up each of these commands online (Google)
10
+ # or read the man pages 'man <command>' to learn more.
11
+
12
+
13
+ $tips = [
14
+ "Use 'cd -' to return to the last directory you were in.",
15
+ "Try using 'pushd' and 'popd' to treat directory histories like a queue!",
16
+ "ctrl-e brings you to the end of the line",
17
+ "ctrl-a brings you to the beginning of the line",
18
+ "Can't figure out a command? Use 'man <command>'",
19
+ "Can't find where a command is located? Use 'which <command>'",
20
+ "ctrl-w deletes the previous word",
21
+ "Using ctrl and the arrow keys can help you move around faster.",
22
+ "ctrl-k deletes all characters that come after the cursor on the same line.",
23
+ "ctrl-u deletes all characters that come before the cursor on the same line.",
24
+ "Search for and execute past commands with ctrl-r",
25
+ "Try using ctrl-d instead of the delete key!",
26
+ "ctrl-h can be used in place of backspace yo.",
27
+ "gangstas use ctrl-f and ctrl-b instead of the left and right arrow keys dawg",
28
+ "the 'find' command searches for matching files in the directory hierarchy.",
29
+ "use 'top' to monitor your system processes!",
30
+ "use 'ifconfig' to monitor networking devices if you're not a square.",
31
+ "Check your memory usage using free (-m)",
32
+ "'killall <process>' kills all processes by name. Oh noes.",
33
+ "'grep' can be used to search a file for a matching pattern.",
34
+ "'od' will dump files in various formats (octal, binary).",
35
+ "'(sudo) shutdown -r now' to restart now!",
36
+ "'wc' gets a wordcount of a file so you can meet that word limit",
37
+ "use 'w' like a creeper to see logged in users and what they're doing.",
38
+ "'whatis' gives you the tldr version of any command.",
39
+ "'whereis' gives you info on where binary, source and man pages are for a command.",
40
+ "Who else is using your system? (Check now with 'who'!)",
41
+ "Put your program into suspended animation using ctrl-z.",
42
+ "Use ctrl-c to kill a running program",
43
+ "'jobs' can be used to list all suspended programs.",
44
+ "the < and > operators redirect standard output to the skinny end",
45
+ "the pipe operator '|' feeds the output of one command as input to another. yum.",
46
+ "ssh can be used to connect to remote machines",
47
+ "scp can be used to transfer files between machines",
48
+ "use 'rsync' to recursively synchronize all directories between two (remote) locations.",
49
+ "'clear' and ctrl-l both give you that fresh new terminal smell",
50
+ "'history' lists a lot of previous commands.",
51
+ "You can use 'alias' to create aliases for commonly used and/or long commands.",
52
+ "Didn't understand a tip? Google it!",
53
+ "Want to run more than one command on a line? Separate them with a semicolon ';'.",
54
+ ]
55
+
56
+ def bother
57
+ "-= #{$tips.sample} =-"
58
+ end
59
+
60
+
metadata ADDED
@@ -0,0 +1,50 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: botherbother
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Lucas Chi
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-03-17 00:00:00.000000000Z
13
+ dependencies: []
14
+ description: ! "botherbother attaches to shell commands (cd) and gives you a random\n
15
+ \ \t\t tip on how to use the shell every time the command is executed."
16
+ email: lucas.chi@cohofund.com
17
+ executables:
18
+ - botherbother
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - lib/botherbother.rb
23
+ - bin/botherbother
24
+ homepage: https://github.com/lchi/botherbother
25
+ licenses:
26
+ - MIT
27
+ post_install_message:
28
+ rdoc_options: []
29
+ require_paths:
30
+ - lib
31
+ required_ruby_version: !ruby/object:Gem::Requirement
32
+ none: false
33
+ requirements:
34
+ - - ! '>='
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ required_rubygems_version: !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ! '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ requirements: []
44
+ rubyforge_project:
45
+ rubygems_version: 1.8.17
46
+ signing_key:
47
+ specification_version: 3
48
+ summary: ! 'Shell education: quick and easy shell tips.'
49
+ test_files: []
50
+ has_rdoc: