cheat / cheatsheets Goto Github PK
View Code? Open in Web Editor NEWCommunity-sourced cheatsheets
Community-sourced cheatsheets
find . -type f -ctime -48h
find: invalid argument `-48h' to `-ctime'
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 ...>
When I think of the parallel
command, I think of GNU parallel
, but some people might have the moreutils version installed. Also there are significant differences in the BSD find
command and the linux find
command. Do you already have a standard way of dealing with this?
I am going to do it.
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>
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?
I would like to have added how to push a tag to remote:
git push origin <tagname>
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
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
In less, some useful commands are the search option and the option to hide the highlighting from the last search (alt + u)
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!
If the files are put in ".cheat/" folder, there comes out the error.
Maybe it's because of the "." wildcard.
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
Not really an issue, more of a request.
Would a contributor proficient with Composer, the PHP dependency manager, be willing to take the time to submit a cheatsheet? 🙏
Otherwise great project; I am thankful I found you. 😺
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.
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.
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.
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
I'll add cheatsheet for golang toolchain more common used commands.
The description of commands could be find here
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.