Cara menggunakan is reversed lazy python?

N�1 sur le Web depuis 2003, avec Condomz tu es s�r(e) de trouver le plus grand choix de capotes et de lubrifiants au Monde. Plus de 600 bo�tes de pr�servatifs diff�rentes, des centaines de gels, et m�me des accessoires pour pimenter ton plaisir. Livr� gratuitement avec le compte VIP � 14,99�/an en France m�tropolitaine !

Ici il y en a pour tous les budgets : de 15 centimes le preservatif � plus de 2 euro pour un pr�servatif de luxe. Toutes les marques fran�aises et europ�ennes (Durex, Manix, Intimy, etc.), respectant la norme NF ou CE, sont disponibles � l�achat. Et si tu ne trouves pas une r�f�rence : demande-l�, nous la chercherons pour toi !

Condomz c�est aussi une source importante d�informations sur le pr�servatif et le gel lubrifiant : des conseils, des avis d�experts, des modes d�emploi, des articles, des vid�os : tout ce que tu veux savoir sur la capote est disponible sur l�une des 3000 pages du site.

Re�ois un pr�servatif gratuit

En 2019 nous avons lanc� l�envoi de pr�servatif gratuit pour permettre � nos clients de d�couvrir toutes les marques de preservatif, et les aider � choisir le mod�le qui leur correspond le mieux : jusqu�� 3 pr�servatifs offerts par commande. Et si tu ne souhaites pas passer commande mais juste recevoir ton �chantillon de pr�servatif, tu ne payez que les frais d�envoi : 1,99 euros pour la France m�tropolitaine !

Et pour payez moins cher ta capote, n�oublie pas non plus de visiter notre page pour voir tous les codes r�duction Condomz disponibles en ce moment !

Comment choisir mon preservatif ?

Pas facile de trouver le pr�servatif qui plait aux 2 partenaires, confortable, bien lubrifi�, � la bonne taille et r�sistant ! Nous avons d�velopp� plein d�applications pour t�aider � faire le bon choix de preservatif :

Et pour finir, nous sommes les premiers � proposer la personnalisation de preservatif : faites imprimer ta photo, logo, message, directement sur le foil (la protection en aluminium) du preservatif. G�nial pour un EVJF, ou pour promouvoir ton club sportif, ton association ou ta soci�t� !

Let's imagine for a moment that there is such a thing as an ideal cheat sheet. What should it look like? What features should it have?

  • Concise — It should only contain the things you need, and nothing else.
  • Fast — It should be possible to use it instantly.
  • Comprehensive — It should contain answers for every possible question.
  • Universal — It should be available everywhere, anytime, without any preparations.
  • Unobtrusive — It should not distract you from your main task.
  • Tutoring — It should help you to learn the subject.
  • Inconspicuous — It should be possible to use it completely unnoticed.

Such a thing exists! It's easy to and there's even .

Features

cheat.sh

  • Has a simple curl/browser/editor interface.
  • Covers 56 programming languages, several DBMSes, and more than 1000 most important UNIX/Linux commands.
  • Provides access to the best community driven cheat sheets repositories in the world, on par with StackOverflow.
  • Available everywhere, no installation needed, but can be installed for offline usage.
  • Ultrafast, returns answers within 100 ms, as a rule.
  • Has a convenient command line client,
        curl cht.sh/go/:list
    
    8, that is very advantageous and helpful, though not mandatory.
  • Can be used directly from code editors, without opening a browser and not switching your mental context.
  • Supports a special stealth mode where it can be used fully invisibly without ever touching a key and making sounds.

Contents

Usage

To get a cheat sheet for a UNIX/Linux command from a command line, query the service using

    curl cht.sh/go/:list
9 or any other HTTP/HTTPS client specifying the name of the command in the query:

    curl cheat.sh/tar
    curl cht.sh/curl
    curl https://cheat.sh/rsync
    curl https://cht.sh/tr

As you can see, you can use both HTTPS and HTTP to access the service, and both the long (cheat.sh) and the short (cht.sh) service names.

Here

    curl cht.sh/go/reverse+a+list
    curl cht.sh/python/random+list+elements
    curl cht.sh/js/parse+json
    curl cht.sh/lua/merge+tables
    curl cht.sh/clojure/variadic+function
0,
    curl cht.sh/go/:list
9,
    curl cht.sh/go/reverse+a+list
    curl cht.sh/python/random+list+elements
    curl cht.sh/js/parse+json
    curl cht.sh/lua/merge+tables
    curl cht.sh/clojure/variadic+function
2, and
    curl cht.sh/go/reverse+a+list
    curl cht.sh/python/random+list+elements
    curl cht.sh/js/parse+json
    curl cht.sh/lua/merge+tables
    curl cht.sh/clojure/variadic+function
3 are names of the UNIX/Linux commands you want to get cheat sheets for.

If you don't know the name of the command you need, you can search for it using the

    curl cht.sh/go/reverse+a+list
    curl cht.sh/python/random+list+elements
    curl cht.sh/js/parse+json
    curl cht.sh/lua/merge+tables
    curl cht.sh/clojure/variadic+function
4 notation. For example, to see how you can make
    curl cht.sh/go/reverse+a+list
    curl cht.sh/python/random+list+elements
    curl cht.sh/js/parse+json
    curl cht.sh/lua/merge+tables
    curl cht.sh/clojure/variadic+function
5 of a filesystem/volume/something else:

    curl cht.sh/~snapshot

The programming language cheat sheets are located in special namespaces dedicated to them.

    curl cht.sh/go/Pointers
    curl cht.sh/scala/Functions
    curl cht.sh/python/lambda

To get the list of available programming language cheat sheets, use the special query

    curl cht.sh/go/reverse+a+list
    curl cht.sh/python/random+list+elements
    curl cht.sh/js/parse+json
    curl cht.sh/lua/merge+tables
    curl cht.sh/clojure/variadic+function
6:

    curl cht.sh/go/:list

Almost each programming language has a special page named

    curl cht.sh/go/reverse+a+list
    curl cht.sh/python/random+list+elements
    curl cht.sh/js/parse+json
    curl cht.sh/lua/merge+tables
    curl cht.sh/clojure/variadic+function
7 that describes the language basics (that's a direct mapping from the "Learn X in Y" project). It could be a good starting point if you've just started learning a language.

If there is no cheat sheet for a programming language query (and it is almost always the case), it is generated on the fly, based on available cheat sheets and answers on StackOverflow. Of course, there is no guarantee that the returned cheat sheet will be a 100% hit, but it is almost always exactly what you are looking for.

Try these (and your own) queries to get the impression of that, what the answers look like:

    curl cht.sh/go/reverse+a+list
    curl cht.sh/python/random+list+elements
    curl cht.sh/js/parse+json
    curl cht.sh/lua/merge+tables
    curl cht.sh/clojure/variadic+function

If you don't like an answer for your queries, you can pick another one. For that, repeat the query with an additional parameter

    curl cht.sh/go/reverse+a+list
    curl cht.sh/python/random+list+elements
    curl cht.sh/js/parse+json
    curl cht.sh/lua/merge+tables
    curl cht.sh/clojure/variadic+function
8,
    curl cht.sh/go/reverse+a+list
    curl cht.sh/python/random+list+elements
    curl cht.sh/js/parse+json
    curl cht.sh/lua/merge+tables
    curl cht.sh/clojure/variadic+function
9 etc. appended:

    curl cht.sh/python/random+string
    curl cht.sh/python/random+string/1
    curl cht.sh/python/random+string/2

Cheat sheets are formatted as code of the queried programming language (at least we are trying our best to do so) so they can be pasted into a program in this language directly. Text comments, if there are any, are formatted according to the language syntax.

    $ curl cht.sh/lua/table+keys
    -- lua: retrieve list of keys in a table

    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end

    --[[
       [ Note that you cannot guarantee any order in keyset. If you want the
       [ keys in sorted order, then sort keyset with table.sort(keyset).
       [ 
       [ [lhf] [so/q/12674345] [cc by-sa 3.0]
       ]]

If you don't need text comments in the answer, you can eliminate them using a special option

    curl cht.sh/python/random+string
    curl cht.sh/python/random+string/1
    curl cht.sh/python/random+string/2
0:

    $ curl cht.sh/lua/table+keys\?Q
    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end

And if you don't need syntax highlighting, switch it off using

    curl cht.sh/python/random+string
    curl cht.sh/python/random+string/1
    curl cht.sh/python/random+string/2
1. You can combine the options together:

    curl cht.sh/go/reverse+a+list\?Q
    curl cht.sh/python/random+list+elements\?Q
    curl cht.sh/js/parse+json\?Q
    curl cht.sh/lua/merge+tables\?QT
    curl cht.sh/clojure/variadic+function\?QT

Full list of all options described below and in

    curl cht.sh/python/random+string
    curl cht.sh/python/random+string/1
    curl cht.sh/python/random+string/2
2.

Try your own queries. Follow these rules:

  1. Try to be more specific (
        curl cht.sh/python/random+string
        curl cht.sh/python/random+string/1
        curl cht.sh/python/random+string/2
    
    3 is better than
        curl cht.sh/python/random+string
        curl cht.sh/python/random+string/1
        curl cht.sh/python/random+string/2
    
    4 and
        curl cht.sh/python/random+string
        curl cht.sh/python/random+string/1
        curl cht.sh/python/random+string/2
    
    5).
  2. Ask practical question if possible (yet theoretical question are possible too).
  3. Ask programming language questions only; specify the name of the programming language as the section name.
  4. Separate words with
        curl cht.sh/python/random+string
        curl cht.sh/python/random+string/1
        curl cht.sh/python/random+string/2
    
    6 instead of spaces.
  5. Do not use special characters, they are ignored anyway.
  6. If you want to eliminate cheat sheets containing some word, add it to the query with
        curl cht.sh/python/random+string
        curl cht.sh/python/random+string/1
        curl cht.sh/python/random+string/2
    
    7:
        curl cht.sh/python/random+string
        curl cht.sh/python/random+string/1
        curl cht.sh/python/random+string/2
    
    8

Read more about the programming languages queries below.


Command line client, cht.sh

The cheat.sh service has its own command line client (

    curl cht.sh/go/:list
8) that has several useful features compared to querying the service directly with
    curl cht.sh/go/:list
9:

  • Special shell mode with a persistent queries context and readline support.
  • Queries history.
  • Clipboard integration.
  • Tab completion support for shells (bash, fish, zsh).
  • Stealth mode.

Installation

To install the client:

PATH_DIR="$HOME/bin"  # or another directory on your $PATH
mkdir -p "$PATH_DIR"
curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
chmod +x "$PATH_DIR/cht.sh"

or to install it globally (for all users):

    curl cht.sh/~snapshot
0

Note: The package "rlwrap" is a required dependency to run in shell mode. Install this using

    $ curl cht.sh/lua/table+keys
    -- lua: retrieve list of keys in a table

    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end

    --[[
       [ Note that you cannot guarantee any order in keyset. If you want the
       [ keys in sorted order, then sort keyset with table.sort(keyset).
       [ 
       [ [lhf] [so/q/12674345] [cc by-sa 3.0]
       ]]
1

Client usage

Now, you can use

    curl cht.sh/go/:list
8 instead of
    curl cht.sh/go/:list
9, and write your queries in more natural way, with spaces instead of
    curl cht.sh/python/random+string
    curl cht.sh/python/random+string/1
    curl cht.sh/python/random+string/2
6:

    curl cht.sh/~snapshot
1

It is even more convenient to start the client in a special shell mode:

    curl cht.sh/~snapshot
2

If all your queries are about the same language, you can change the context and spare repeating the programming language name:

    curl cht.sh/~snapshot
3

or even start the client in this context:

    curl cht.sh/~snapshot
4

If you want to change the context, you can do it with the

    $ curl cht.sh/lua/table+keys
    -- lua: retrieve list of keys in a table

    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end

    --[[
       [ Note that you cannot guarantee any order in keyset. If you want the
       [ keys in sorted order, then sort keyset with table.sort(keyset).
       [ 
       [ [lhf] [so/q/12674345] [cc by-sa 3.0]
       ]]
5 command, or if you want do a single query for some other language, just prepend it with
    $ curl cht.sh/lua/table+keys
    -- lua: retrieve list of keys in a table

    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end

    --[[
       [ Note that you cannot guarantee any order in keyset. If you want the
       [ keys in sorted order, then sort keyset with table.sort(keyset).
       [ 
       [ [lhf] [so/q/12674345] [cc by-sa 3.0]
       ]]
6:

    curl cht.sh/~snapshot
5

If you want to copy the last answer into the clipboard, you can use the

    $ curl cht.sh/lua/table+keys
    -- lua: retrieve list of keys in a table

    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end

    --[[
       [ Note that you cannot guarantee any order in keyset. If you want the
       [ keys in sorted order, then sort keyset with table.sort(keyset).
       [ 
       [ [lhf] [so/q/12674345] [cc by-sa 3.0]
       ]]
7 (
    $ curl cht.sh/lua/table+keys
    -- lua: retrieve list of keys in a table

    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end

    --[[
       [ Note that you cannot guarantee any order in keyset. If you want the
       [ keys in sorted order, then sort keyset with table.sort(keyset).
       [ 
       [ [lhf] [so/q/12674345] [cc by-sa 3.0]
       ]]
8) command, or
    $ curl cht.sh/lua/table+keys
    -- lua: retrieve list of keys in a table

    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end

    --[[
       [ Note that you cannot guarantee any order in keyset. If you want the
       [ keys in sorted order, then sort keyset with table.sort(keyset).
       [ 
       [ [lhf] [so/q/12674345] [cc by-sa 3.0]
       ]]
9 (
    $ curl cht.sh/lua/table+keys\?Q
    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end
0, without comments).

    curl cht.sh/~snapshot
6

Type

    $ curl cht.sh/lua/table+keys\?Q
    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end
1 for other internal
    curl cht.sh/go/:list
8 commands.

    curl cht.sh/~snapshot
7

The

    curl cht.sh/go/:list
8 client has its configuration file which is located at
    $ curl cht.sh/lua/table+keys\?Q
    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end
4 (location of the file can be overridden by the environment variable
    $ curl cht.sh/lua/table+keys\?Q
    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end
5). Use it to specify query options that you would use with each query. For example, to switch syntax highlighting off create the file with the following content:

    curl cht.sh/~snapshot
8

Or if you want to use a special syntax highlighting theme:

    curl cht.sh/~snapshot
9

(

    $ curl cht.sh/lua/table+keys\?Q
    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end
6 to see all supported styles).

Other cht.sh configuration parameters:

    curl cht.sh/go/Pointers
    curl cht.sh/scala/Functions
    curl cht.sh/python/lambda
0

Tab completion

Bash Tab completion

To activate tab completion support for

    curl cht.sh/go/:list
8, add the
    $ curl cht.sh/lua/table+keys\?Q
    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end
8 script to your
    $ curl cht.sh/lua/table+keys\?Q
    local keyset={}
    local n=0

    for k,v in pairs(tab) do
      n=n+1
      keyset[n]=k
    end
9:

    curl cht.sh/go/Pointers
    curl cht.sh/scala/Functions
    curl cht.sh/python/lambda
1

ZSH Tab completion

To activate tab completion support for

    curl cht.sh/go/:list
8, add the
    curl cht.sh/go/reverse+a+list\?Q
    curl cht.sh/python/random+list+elements\?Q
    curl cht.sh/js/parse+json\?Q
    curl cht.sh/lua/merge+tables\?QT
    curl cht.sh/clojure/variadic+function\?QT
1 script to the fpath in your
    curl cht.sh/go/reverse+a+list\?Q
    curl cht.sh/python/random+list+elements\?Q
    curl cht.sh/js/parse+json\?Q
    curl cht.sh/lua/merge+tables\?QT
    curl cht.sh/clojure/variadic+function\?QT
2:

    curl cht.sh/go/Pointers
    curl cht.sh/scala/Functions
    curl cht.sh/python/lambda
2


Stealth mode

Being used fully unnoticed is one of the most important property of any cheat sheet.

cheat.sh can be used completely unnoticed too. The cheat.sh client,

    curl cht.sh/go/:list
8, has a special mode, called stealth mode. Using that, you don't even need to touch your keyboard to open a cheat sheet.

In this mode, as soon as you select some text with the mouse (and thus adding it into the selection buffer of X Window System or into the clipboard) it's used as a query string for cheat.sh, and the correspondent cheat sheet is automatically shown.

Let's imagine, that you are having an online interview, where your interviewer asks you some questions using a shared document (say Google Docs) and you are supposed to write your coding answers there (it's possible too that you'll type in the questions on your own, just to show to the interviewer that you've heard it right).

When using the stealth mode of

    curl cht.sh/go/:list
8, the only thing you need to do in order to see a cheat sheet for some question, is to select the question using the mouse. If you don't want any text in the answers and the only thing you need is code, use the
    curl cht.sh/go/reverse+a+list\?Q
    curl cht.sh/python/random+list+elements\?Q
    curl cht.sh/js/parse+json\?Q
    curl cht.sh/lua/merge+tables\?QT
    curl cht.sh/clojure/variadic+function\?QT
5 option when starting the stealth mode.

    curl cht.sh/go/Pointers
    curl cht.sh/scala/Functions
    curl cht.sh/python/lambda
3

Of course, this is just for fun, and you should never cheat in your coding interviews, because you know what happens when you do.

Windows command line client

You can access cheat.sh from Windows command line too.

Use cheat.sh command line client for that:

    curl cht.sh/go/reverse+a+list\?Q
    curl cht.sh/python/random+list+elements\?Q
    curl cht.sh/js/parse+json\?Q
    curl cht.sh/lua/merge+tables\?QT
    curl cht.sh/clojure/variadic+function\?QT
6. It supports:

  • output colorization;
  • command line options;
  • its own configuration file.

You can also use

    curl cht.sh/go/reverse+a+list\?Q
    curl cht.sh/python/random+list+elements\?Q
    curl cht.sh/js/parse+json\?Q
    curl cht.sh/lua/merge+tables\?QT
    curl cht.sh/clojure/variadic+function\?QT
7 command-line installer for Windows to get it:

    curl cht.sh/go/Pointers
    curl cht.sh/scala/Functions
    curl cht.sh/python/lambda
4


Self-Hosting

Docker

Currently, the easiest way to get a self-hosted instance running is by using the

    curl cht.sh/go/reverse+a+list\?Q
    curl cht.sh/python/random+list+elements\?Q
    curl cht.sh/js/parse+json\?Q
    curl cht.sh/lua/merge+tables\?QT
    curl cht.sh/clojure/variadic+function\?QT
8 file.

    curl cht.sh/go/Pointers
    curl cht.sh/scala/Functions
    curl cht.sh/python/lambda
5

This builds and runs the image with baked in cheatsheets and starts the app and a Redis instance to back it, making the service available at http://localhost:8002 This is currently an early implementation and should probably not be used for anything outside of internal/dev/personal use right now.

Editors integration

You can use cheat.sh directly from the editor (Emacs, Sublime, Vim, and Visual Studio Code are currently supported; not all features are supported by all plugins though; see below). Instead of opening your browser, googling, browsing Stack Overflow and eventually copying the code snippets you need into the clipboard and later pasting them into the editor, you can achieve the same instantly and without leaving the editor at all!

Here is what it looks like in Vim:

  1. If you have a question while editing a program, you can just type your question directly in the buffer and press

        curl cht.sh/go/reverse+a+list\?Q
        curl cht.sh/python/random+list+elements\?Q
        curl cht.sh/js/parse+json\?Q
        curl cht.sh/lua/merge+tables\?QT
        curl cht.sh/clojure/variadic+function\?QT
    
    9. You will get the answer to your question in pager. (with
    PATH_DIR="$HOME/bin"  # or another directory on your $PATH
    mkdir -p "$PATH_DIR"
    curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
    chmod +x "$PATH_DIR/cht.sh"
    0 you'll get the answer in a separate buffer).

  2. If you like the answer, you can manually paste it from the buffer or the pager, or if you are lazy you can use

    PATH_DIR="$HOME/bin"  # or another directory on your $PATH
    mkdir -p "$PATH_DIR"
    curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
    chmod +x "$PATH_DIR/cht.sh"
    1 to paste it below/under your question (or replace you question using
    PATH_DIR="$HOME/bin"  # or another directory on your $PATH
    mkdir -p "$PATH_DIR"
    curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
    chmod +x "$PATH_DIR/cht.sh"
    2). If you want the answer without the comments,
    PATH_DIR="$HOME/bin"  # or another directory on your $PATH
    mkdir -p "$PATH_DIR"
    curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
    chmod +x "$PATH_DIR/cht.sh"
    3 replays the last query toggling them.

If you use some static analysis plugin such as syntastic (for Vim), you can use its warning and error messages as cheat.sh queries: place the cursor on the problem line and press

PATH_DIR="$HOME/bin"  # or another directory on your $PATH
mkdir -p "$PATH_DIR"
curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
chmod +x "$PATH_DIR/cht.sh"
4: explanation for the warning will be opened in a new buffer.

Features supported by cheat.sh plugins for different editors:

FeatureEmacsSublimeVimVSCodeIDEAQtCreatorCommand queries✓✓✓✓✓✓Queries from buffer✓✓✓Toggle comments✓✓✓✓Prev/next answer✓✓✓✓Multiple answers✓✓Warnings as queries✓Queries history✓✓Session id✓Configurable server✓✓✓✓

Vim

  • cheat.sh-vim — Vim support

Here is Vim configuration example:

    curl cht.sh/go/Pointers
    curl cht.sh/scala/Functions
    curl cht.sh/python/lambda
6

In this example, several Vim plugins are used:

  • gmarik/vundle — Vim plugin manager
  • scrooloose/syntastic — Syntax checking plugin
  • cheat.sh-vim — Vim support

Syntastic shows warnings and errors (found by code analysis tools:

PATH_DIR="$HOME/bin"  # or another directory on your $PATH
mkdir -p "$PATH_DIR"
curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
chmod +x "$PATH_DIR/cht.sh"
5,
PATH_DIR="$HOME/bin"  # or another directory on your $PATH
mkdir -p "$PATH_DIR"
curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
chmod +x "$PATH_DIR/cht.sh"
6,
PATH_DIR="$HOME/bin"  # or another directory on your $PATH
mkdir -p "$PATH_DIR"
curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
chmod +x "$PATH_DIR/cht.sh"
7,
PATH_DIR="$HOME/bin"  # or another directory on your $PATH
mkdir -p "$PATH_DIR"
curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
chmod +x "$PATH_DIR/cht.sh"
8 etc.), and
PATH_DIR="$HOME/bin"  # or another directory on your $PATH
mkdir -p "$PATH_DIR"
curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
chmod +x "$PATH_DIR/cht.sh"
9 shows you explanations for the errors and warnings and answers on programming languages queries written in the editor.

Watch a demo, where the most important features of the cheat.sh Vim plugin are shown (5 Min):

Or, if you want to scroll and/or pause, the same on YouTube:

Emacs

  • cheat-sh.el — Emacs support (available also at cheat.sh/:emacs)
  • cheat.sh/:emacs-ivy — Emacs support for ivy users

Cara menggunakan is reversed lazy python?

Visual Studio Code

  • vscode-snippet
  • Install it from VSCode Marketplace

Usage:

  1. Hit ⌘ Command + ⇧ Shift + p
  2. Run
        curl cht.sh/~snapshot
    
    00.
  3. Type your query and hit enter.

(GIF courtesy: Matthias Endler, @mre)

Sublime

  • cheat.sh-sublime-plugin

Usage:

  1. Write your query string.
  2. Select the query string.
  3. Press Cmd + ⇧ Shift + B to replace the selected query string by the answer generated from
        curl cht.sh/go/:list
    
    8.

(GIF courtesy: Gaurav Kukreja, @gauravk-in)

IntelliJ IDEA

  • idea-cheatsh-plugin
  • Install from idea plugins marketplace

Usage:

  1. Write query string
  2. Select the query string
  3. Press keyboard shortcut Alt + C , S to replace the selected query string by the answer

(GIF courtesy: Szymon Przebierowski, @szymonprz)

QtCreator

  • cheatsh-qtcreator

Current features:

  • search word under cursor
  • search selected
  • query search
  • disable comments
  • paste answer (?TQ version)
  • custom server URL
  • custom search context (default is cpp)
  • hotkeys and menu

Cara menggunakan is reversed lazy python?

(GIF courtesy: Pozemka, @pozemka)

Special pages

There are several special pages that are not cheat sheets. Their names start with colon and have special meaning.

Getting started:

    curl cht.sh/go/Pointers
    curl cht.sh/scala/Functions
    curl cht.sh/python/lambda
7

Command line client

    curl cht.sh/go/:list
8 and shells support:

    curl cht.sh/go/Pointers
    curl cht.sh/scala/Functions
    curl cht.sh/python/lambda
8

Editors support:

    curl cht.sh/go/Pointers
    curl cht.sh/scala/Functions
    curl cht.sh/python/lambda
9

Other pages:

    curl cht.sh/go/:list
0

Search

To search for a keyword, use the query:

    curl cht.sh/go/:list
1

In this case search is not recursive — it is conducted only in a page of the specified level. For example:

    curl cht.sh/go/:list
2

For a recursive search in all cheat sheets, use double slash:

    curl cht.sh/go/:list
3

You can use special search options after the closing slash:

    curl cht.sh/go/:list
4

List of search options:

    curl cht.sh/go/:list
5

Programming languages cheat sheets

Cheat sheets related to programming languages are organized in namespaces (subdirectories), that are named according to the programming language.

For each supported programming language there are several special cheat sheets: its own sheet,

    curl cht.sh/~snapshot
03,
    curl cht.sh/go/reverse+a+list
    curl cht.sh/python/random+list+elements
    curl cht.sh/js/parse+json
    curl cht.sh/lua/merge+tables
    curl cht.sh/clojure/variadic+function
6 and
    curl cht.sh/go/reverse+a+list
    curl cht.sh/python/random+list+elements
    curl cht.sh/js/parse+json
    curl cht.sh/lua/merge+tables
    curl cht.sh/clojure/variadic+function
7. Say for lua it will look like:

    curl cht.sh/go/:list
6

Some languages has the one-liners-cheat sheet,

    curl cht.sh/~snapshot
06:

    curl cht.sh/go/:list
7

  •     curl cht.sh/~snapshot
    
    03 describes how you can start with the language — install it if needed, build and run its programs, and it shows the "Hello world" program written in the language;
  •     curl cht.sh/go/reverse+a+list
        curl cht.sh/python/random+list+elements
        curl cht.sh/js/parse+json
        curl cht.sh/lua/merge+tables
        curl cht.sh/clojure/variadic+function
    
    6 shows all topics related to the language
  •     curl cht.sh/go/reverse+a+list
        curl cht.sh/python/random+list+elements
        curl cht.sh/js/parse+json
        curl cht.sh/lua/merge+tables
        curl cht.sh/clojure/variadic+function
    
    7 shows a learn-x-in-minutes language cheat sheet perfect for getting started with the language.
  •     curl cht.sh/~snapshot
    
    06 is a collection of one-liners in this language
  •     curl cht.sh/~snapshot
    
    11 is a collection of examples of weird things in this language

At the moment, cheat.sh covers the 58 following programming languages (alphabetically sorted):

PrefixLanguageBasicsOne-linersWeirdnessStackOverflow
    curl cht.sh/~snapshot
12Arduino✓
    curl cht.sh/~snapshot
13Assembly✓
    curl cht.sh/~snapshot
14AWK✓✓
    curl cht.sh/~snapshot
15Bash✓✓
    curl cht.sh/~snapshot
16BASIC✓
    curl cht.sh/~snapshot
17Brainfuck✓✓
    curl cht.sh/~snapshot
18C✓✓
    curl cht.sh/~snapshot
19Chapel✓✓
    curl cht.sh/~snapshot
20Clean✓
    curl cht.sh/~snapshot
21Clojure✓✓
    curl cht.sh/~snapshot
22CoffeeScript✓✓
    curl cht.sh/~snapshot
23C++✓✓
    curl cht.sh/~snapshot
24C#✓✓
    curl cht.sh/~snapshot
25D✓✓
    curl cht.sh/~snapshot
26Dart✓✓
    curl cht.sh/~snapshot
27Dephi✓
    curl cht.sh/~snapshot
28Dylan✓✓
    curl cht.sh/~snapshot
29Eiffel✓
    curl cht.sh/~snapshot
30Elixir✓✓
    curl cht.sh/~snapshot
31ELisp✓✓
    curl cht.sh/~snapshot
32Elm✓✓
    curl cht.sh/~snapshot
33Erlang✓✓
    curl cht.sh/~snapshot
34Factor✓✓
    curl cht.sh/~snapshot
35Fortran✓✓
    curl cht.sh/~snapshot
36Forth✓✓
    curl cht.sh/~snapshot
37F#✓✓
    curl cht.sh/~snapshot
38Go✓✓
    curl cht.sh/~snapshot
39Groovy✓✓
    curl cht.sh/~snapshot
40Haskell✓✓
    curl cht.sh/~snapshot
41Java✓✓
    curl cht.sh/~snapshot
42JavaScript✓✓✓✓
    curl cht.sh/~snapshot
43Julia✓✓
    curl cht.sh/~snapshot
44Kotlin✓✓
    curl cht.sh/~snapshot
45LaTeX✓✓
    curl cht.sh/~snapshot
46Lisp✓✓
    curl cht.sh/~snapshot
47Lua✓✓
    curl cht.sh/~snapshot
48MATLAB✓✓
    curl cht.sh/~snapshot
49Nim✓✓
    curl cht.sh/~snapshot
50OCaml✓✓
    curl cht.sh/~snapshot
51Octave✓✓
    curl cht.sh/~snapshot
52Perl✓✓✓
    curl cht.sh/~snapshot
53Perl 6✓✓✓
    curl cht.sh/~snapshot
54PHP✓✓
    curl cht.sh/~snapshot
55Pike✓
    curl cht.sh/~snapshot
56Python✓✓✓
    curl cht.sh/~snapshot
57Python 3✓✓
    curl cht.sh/~snapshot
58R✓✓
    curl cht.sh/~snapshot
59Racket✓✓
    curl cht.sh/~snapshot
60Ruby✓✓
    curl cht.sh/~snapshot
61Rust✓✓
    curl cht.sh/~snapshot
62Scala✓✓
    curl cht.sh/~snapshot
63Scheme✓✓
    curl cht.sh/~snapshot
64Solidity✓✓
    curl cht.sh/~snapshot
65Swift✓✓
    curl cht.sh/~snapshot
66Tcsh✓✓
    curl cht.sh/~snapshot
67Tcl✓✓
    curl cht.sh/~snapshot
68Objective-C✓✓
    curl cht.sh/~snapshot
69VisualBasic✓✓
    curl cht.sh/~snapshot
70VB.Net✓✓

And several other topics, that are though related to programming, are not programming languages:

PrefixTopicBasicsStackOverflow
    curl cht.sh/~snapshot
71CMake✓✓
    curl cht.sh/~snapshot
72Django✓
    curl cht.sh/~snapshot
73Flask✓
    curl cht.sh/~snapshot
74Git✓✓

Cheat sheets sources

Instead of creating yet another mediocre cheat sheet repository, we are concentrating our efforts on creation of a unified mechanism to access selected existing well developed and good maintained cheat sheet repositories covering topics of our interest: programming and operating systems usage.

cheat.sh uses selected community driven cheat sheet repositories and information sources, maintained by thousands of users, developers and authors all over the world (in the Users column number of contributors/number of stars is shown):

Cheat sheetsRepositoryC/U*StarsCreation DateUNIX/Linux, programmingcheat.sheetsMay 1, 2017UNIX/Linux commandstldr-pages/tldrDec 8, 2013UNIX/Linux commandschrisallenlane/cheatJul 28, 2013Programming languagesadambard/learnxinyminutes-docsJun 23, 2013Goa8m/go-lang-cheat-sheetFeb 9, 2014Perlpkrumnis/perl1line.txtNov 4, 2011Programming languagesStackOverflow14MN/ASep 15, 2008

(*) C/U — contributors for GitHub repositories, Users for Stackoverflow

Pie diagram reflecting cheat sheets sources distribution (by number of cheat sheets on cheat.sh originating from a repository):

How to contribute

How to edit a cheat sheet

If you want to edit a cheat.sh cheat sheet, you should edit it in the upstream repository. You will find the name of the source repository in a browser when you open a cheat sheet. There are two github buttons at the bottom of the page: the second one is the button of the repository, which belongs the current cheat sheet.

You can edit the cheat sheet directly in your browser (you need a github account for it). There is an edit button in the top right corner. If you click on it, an editor will be open. There you will change the cheat sheet (under the hood: the upstream repository is forked, your changes are committed in the forked repository, a pull request to the upstream repository owner is sent).

How to add a cheat sheet

If you want to add a cheat sheet, you have one of the following ways:

  • Add it to one of the external cheat sheets repositories; you should decide on your own what is the best repository for your cheat sheet;
  • Add it to the local cheat.sh repository (cheat.sheets) on github (fork, commit, pull request);
  • Post it on cheat.sh using curl or a web browser (cheat.sh/:post).

If you want to change an existing cheat sheet, you have to find the original repository (when you open a cheat sheet in a browser, you see the repository's github button in the bottom of the cheat sheet), the cheat sheet is coming from, and change it there. After some time the changes will be synchronized on cheat.sh.