GitXplorerGitXplorer
y

cheat

public
0 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
11f8caf75052ce47f3661e5d3e3f6eb3e0a46705

add mongodb

yypetya committed 11 years ago
Unverified
b4db7294aa6852c392e6dcd2cb96162eaf9d583a

chmod +x

yypetya committed 11 years ago
Unverified
20e0c23c7ca4124e55c5025bc7cbd988e2569928

add OSGi,marionette

yypetya committed 11 years ago
Unverified
76dc8267b9df2ea4eeb42b3b4b181011007b919d

cheat sheet name bash completion example added

yypetya committed 12 years ago
Unverified
4a49445d01d431b20ac351a81bacb9d506aeaf04

initial cheat.sh

yypetya committed 12 years ago
Unverified
2250558d1f3313991e3b7d731f1c43f857848d16

Initial commit

yypetya committed 12 years ago

README

The README file for this repository.

Usage of cheat.sh

  • Display cheat sheet of something:

    cheat.sh -d <on_what>

  • Create or edit a cheat sheet:

    cheat.sh -e <on_what>

  • List all the cheat sheets:

    cheat.sh -l

Reasons

  1. The original idea is from http://cheat.errtheblog.com/
  2. This time it uses an own git repo as a common database of markdown files
  3. This repo contains a very simple bash script which manages cheat sheets
  4. Easily manage cheat accounts via Github
  5. You can create convenient aliases to use this script. Good luck!

Helpful aliases

alias ch="~/.cheat/cheat -d"
alias ch?="~/.cheat/cheat -l | grep"

# cheat sheet completion

export CHEAT="~/.cheat"
cheat_complete() {
    local cur=${COMP_WORDS[COMP_CWORD]}
    CHEAT_COMPLETE=( $(ls -1 $CHEAT $CHEAT/errtheblog/ | grep .md | sort -u | cut -f1 -d'.' ) )
    COMPREPLY=( $(compgen -W "${CHEAT_COMPLETE[*]}" -- $cur) )
}
complete -F cheat_complete ch
complete -F cheat_complete cheat