Coder Social home page Coder Social logo

cheatsheets's Introduction

cheatsheets

This repository contains community-sourced cheatsheets to be used with cheat and similar applications.

Format

Cheatsheets are plain-text files that begin with an optional "front matter" header in YAML format. The header may be used to assign "tags" to a sheet, and to specify the sheet's syntax (bash, python, go, etc).

When possible, cheatsheets should conform to this format:

---
syntax: bash
tags: [ vcs, development ]
---
# To stage all changes in the current directory:
git add --all

# To commit staged changes:
git commit -m <message>

As a guideline, it is preferred to use docopt syntax when specifying parameter placeholders. In edge-cases where that syntax may cause confusion, it is permissible to use placeholder values (foo.txt, example.com, etc.) as necessary.

License

Cheatsheets are licensed under Creative Commons CC0 1.0. See LICENSE.txt for the full license text.

cheatsheets's People

Contributors

bannmann avatar briandfoy avatar chrisallenlane avatar dude-with-the-long-username avatar ffranchina avatar gkspranger avatar glenacota avatar harrison-s1 avatar herbygillot avatar j1shnu avatar jazzabeanie avatar joeytwiddle avatar jonny-exe avatar kalaschnik avatar kreyren avatar kush avatar lengyijun avatar loreb avatar luciolebrillante avatar marcusnjones avatar mikeoertli avatar mlau-git avatar obalunenko avatar pankajbhanu avatar papanito avatar philclifford avatar shuber2 avatar tcpekin avatar theweirddev avatar thirdscript avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cheatsheets's Issues

Cheatsheet for Regex

I think we should create one for Regex

I might do it later, but I'm pretty busy right now and I also am far from a regex expert. If someone has time to do it soon, I suggest they go for it!

How to draw table in cheatsheets

Rust         | Cpp              |                      
=============|==================|=====================|=======================
a:&T         | const T* const a | 都不能修改          | 不可变引用的不可变绑定
mut a:&T     | const T* a       | 不能修改a指向的内容 | 不可变引用的可变绑定
a:&mut T     | T* const a       | 不能修改a           | 可变引用的不可变绑定
mut a:&mut T | T*a              | 都能修改            | 可变引用的可变绑定

Currently, I draw table like this. Is there any way to make more complex table?

Contributing a useful tip for tmux integration

Sorry to pollute the issue queue with this but I wasn't sure where else to put it.

I wrote a couple of simple bash functions that make it easy to pull up and edit a cheat document in a new pane and close it from the command line when using tmux. Maybe it could be included in the documentation somewhere.

tmux_cheat_page() {
if [[ "$TERM" =~ 'screen' ]] && [[ -n "$CHEAT_EDITOR" ]]; then

  pane=$(tmux showw -v @tmux_cheat_pane)
  output=$(tmux list-panes -t ${pane} 2>&1)

  if [[ $pane ]] && ! [[ -z "$pane" ]] && ! [[ $output =~ 'find pane' ]]; then
    tmux -q respawn-pane -k -t $pane cheat -e $1
  else
    tmux split-window -vf cheat -e $1
    pane=$(tmux display-message -p "#{pane_id}")
    tmux setw @tmux_cheat_pane $pane
    tmux select-pane -t {last}
  fi

fi
}

tmux_cheat_page_close() {

  pane=$(tmux showw -v @tmux_cheat_pane)

  if [ $pane ]; then
     tmux kill-pane -t $pane
  fi
}

export -f tmux_cheat_page
export -f tmux_cheat_page_close

Very slow pull request merging?

I just wanted to ask if there is active administration

Cheat is an awesome project and I want to contribute to it, as there are many commands missing.

The system with tags and all is very good, and I tried to explain everything best.

But it seems for now noone even looked at these additions, and there are 27 more left open.

Specify one valid placeholder path format

This issue aims to make pages standardized and more readable.

Format:

  • <path/to/file>
  • <path/to/directory>
  • <path/to/file1 path/to/file2 ...>
  • <path/to/directory1 path/to/directory2 ...>

Cheatsheet for the `ed` line editor created

I've written a cheat sheet for ed, but to be honest I'm not sure how to actually create a pull request using Github's web interface, so it's below:

---
tags [ ed ]
---

# File and buffer management

:e {file}       load file to buffer
:q              quit
:Q              quit without saving changes
:f {name}       change buffer name
:w              write to file using current buffer name 
:w {file}       write buffer to new file
:wq             write buffer to existing file and exit

# Line-oriented addressing and movement 
#   `ed' uses line addresses to move around and operate within a buffer
#   Move to or operate on single lines by entering the line number
#   Move to or operate on ranges of lines using comma-separated values
#   The active line is always set to the last number of the range entered

. or p          display current line
n               display current line with line number

1,$ or ,        range indicating the entire buffer; displays final line

3 or 3p         move to line 3 of the buffer and display
3n              move to line 3 of the buffer and display with line number

1,$p or ,p      display entire buffer without line numbers
1,$n or ,n      display entire buffer with line numbers

15,25p          display lines 15 through 25 of the buffer
15,25n          display lines 15 through 25 of the buffer with line numbers

# Line editing commands
#   All commands can be prefixed with line addresses/ranges

i               start editing by inserting new text before the current line
a               start editing by inserting new text after the current line
c               clear contents of current line and replace with new text
.               a period [.] enterd alone on a new line ends the active edit

d               delete current line
1,3d            delete lines 1 through 3

u               undo last edit

r {file}        read contents of {file} into buffer after current line
r !{command}    read output of {command} into buffer after current line

# Example of a simple editing session

e test.txt                      edit file "test.txt"
45                              `ed' returns character count as confirmation
1,3n                            display lines 1 through 3 with line numbers
1    This is line 1           
2    This is line 2
3    This is line 3
2c                              change line 2
I am typing a new line 2
.                               end active edit 
1,3n                            display lines 1 thorugh 3 with line numbers
1    This is line 1
2    I am typing a new line 2
3    This is line 3
wq                              write file "test.txt" and exit

# Search
#   Accepts regexps in search strings

g/foo/          search all lines for `foo' and display matching lines
g/foo/n         search all lines for `foo'; display with line numbers

4,9/foo/        search lines 1 through 5 for `foo' and display matches 
4,9/foo/n       search lines 1 through 5 for `foo'; display with line numbers

# Replace
#   Accepts regexps in search and replace strings

s/foo/bar       replace first instance of `foo' with `bar' on the current line
s/foo/bar/{n}   replace {n}th instance of `foo' with `bar' on the current line
s/foo/bar/g     replace all instances of `foo' with `bar' on the current line

1,4/foo/bar/g   replace all instances of `foo' with `bar` in lines 1 through 4

,s/foo/bar/g    replace all instances of `foo' with `bar' in the entire buffer

raw file accesss via url no longer working

Hi!
I love this little tool and set of instructions. I was using it quite often about a year ago. Now suddenly it doesn't work anymore. It seem that GitHub have borked up this functionality.

The following used to work from command line:

curl -sS https://raw.githubusercontent.com/cheat/cheat/master/cheat/cheatsheets/git

But now it just return a 404. So I tried various other combinations, but without success.

curl -sS https://github.com/cheat/cheatsheets/raw/master/git

# <html><body>You are being <a href="https://raw.githubusercontent.com/cheat/cheatsheets/master/git">redirected</a>.</body></html>

License of the repo

In order to allow collaboration, this repository should have a license. As a content-based repo (containing text, rather than runnable software), I would suggest a license like CC-BY 4.0; that's what we're adopting at tldr-pages.

Tags syntax

The syntax for tags is incorrect for many files. tags should be followed by a colon (:) in order to work with the -t option. For example, look at the tag lines for files tagged with networking.

dhclient:tags: [ networking ]
ip:tags [ networking ]
iptables:tags [ networking ]
iwconfig:tags [ networking ]
nc:tags [ networking ]
ncat:tags [ networking ]
netstat:tags [ networking ]
nmap:tags [ networking ]
nmcli:tags [ networking ]
ping:tags [ networking ]
ping6:tags [ networking ]
route:tags [ networking ]
socat:tags [ networking ]
sockstat:tags [ networking ]
ss:tags [ networking ]

Only the tag for dhclient is picked up with the -t option (note the colon after tags: for dhclient in the output above).

$ cheat -l -t networking
title:        file:                                                    tags:
dhclient ./cheatsheets/community/dhclient      community,networking

How to use fzf with cheat?

I added export CHEAT_USE_FZF=true to .zshrc but I am not sure how to use cheat with fzf.
When using cheat ** fzf is running fuzzy search in filesystem but not in cheats.

find

find . -type f -ctime -48h

find: invalid argument `-48h' to `-ctime'

Cheatsheet for go

I'll add cheatsheet for golang toolchain more common used commands.

The description of commands could be find here

Replace markdown Heading syntax by # Headings

In the Markdown Cheatsheet it says
# headers
h1 header
=========
h2 header
---------

I think it would be better to have sth like
"# h1 heading"
"###### h6 heading"
# (without double quotes")
the markdown #heading syntax should be prefered because its more universal.
the only point against this is that it could be confused with the # coment synthax in bash and in the cheat sheat.
I think that the way mentioned above is a good workaround

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.