mirror of
https://github.com/namibia/awesome-cheatsheets.git
synced 2024-11-18 11:05:16 +00:00
Merge branch 'master' of github.com:LeCoupa/awesome-cheatsheets
This commit is contained in:
commit
7473bd427d
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,3 +3,6 @@
|
||||
|
||||
# Editors
|
||||
.vscode/
|
||||
|
||||
# Vim
|
||||
*.swp
|
||||
|
@ -61,7 +61,7 @@ django-admin help # display usage information and a list
|
||||
django-admin makemigrations # create new migrations to the database based on the changes detected in the models
|
||||
django-admin migrate # synchronize the database state with your current state project models and migrations
|
||||
django-admin remove_stale_contenttypes # Deletes stale content types (from deleted models) in your database.y.
|
||||
django-admin runserver # start the development webserver at 127.0.0.1 with the port 8000
|
||||
django-admin runserver <port> # start the development webserver at 127.0.0.1 with the port <port> default 8000
|
||||
django-admin sendtestemail # Sends a test email to the email addresses specified as arguments.
|
||||
django-admin shell # Runs a Python interactive interpreter. Tries to use IPython or bpython, if one of them is available. Any standard input is executed as code.
|
||||
django-admin showmigrations # Shows all available migrations for the current project.
|
||||
|
@ -115,7 +115,7 @@ HINCRBY key field increment # increment value in hash by X
|
||||
HDEL key field [field ...] # delete one or more hash fields
|
||||
HEXISTS key field # determine if a hash field exists
|
||||
HKEYS key # get all the fields in a hash
|
||||
HLEN key # get all the fields in a hash
|
||||
HLEN key # get the number of fields in a hash
|
||||
HSTRLEN key field # get the length of the value of a hash field
|
||||
HVALS key # get all the values in a hash
|
||||
|
||||
|
@ -10,28 +10,28 @@
|
||||
<html lang="en"></html> <!-- The HTML lang attribute is used to identify the language of text content on the web. This information helps search engines return language specific results, -->
|
||||
<head></head> <!-- Contains Information specific to the page like title, styles and scripts -->
|
||||
<title></title> <!-- Title for the page that shows up in the browser title bar -->
|
||||
<body></body> <!-- Content that the user will see -->
|
||||
<body></body> <!-- Content that the user will see -->
|
||||
|
||||
|
||||
<!-- Document Information -->
|
||||
|
||||
|
||||
<base/> <!-- Usefull for specifying relative links in a document -->
|
||||
<style></style> <!-- Contains styles for the html document -->
|
||||
<meta/> <!-- Contains additional information about the page, author, page description and other hidden page info -->
|
||||
<script></script> <!-- Contains all scripts internal or external -->
|
||||
<style></style> <!-- Contains styles for the html document -->
|
||||
<meta/> <!-- Contains additional information about the page, author, page description and other hidden page info -->
|
||||
<script></script> <!-- Contains all scripts internal or external -->
|
||||
<link/> <!-- Used to create relationships with external pages and stylesheets -->
|
||||
|
||||
|
||||
<!-- Document Structure -->
|
||||
|
||||
|
||||
<h1></h1> ... <h6></h6> <!-- All six levels of heading with 1 being the most promiment and 6 being the least prominent -->
|
||||
<p></p> <!-- Used to organize paragraph text -->
|
||||
<div></div> <!-- A generic ontainerused to denote a page section -->
|
||||
<span></span> <!-- Inline section or block container used for creating inline style elements -->
|
||||
<br/> <!-- Creates a line-break -->
|
||||
<hr> <!-- Creates a sectional break into HTML -->
|
||||
<h1></h1> ... <h6></h6> <!-- All six levels of heading with 1 being the most promiment and 6 being the least prominent -->
|
||||
<p></p> <!-- Used to organize paragraph text -->
|
||||
<div></div> <!-- A generic container used to denote a page section -->
|
||||
<span></span> <!-- Inline section or block container used for creating inline style elements -->
|
||||
<br/> <!-- Creates a line-break -->
|
||||
<hr> <!-- Creates a sectional break into HTML -->
|
||||
|
||||
|
||||
<!-- Text Formatting -->
|
||||
@ -39,10 +39,10 @@
|
||||
|
||||
<strong></strong> and <b></b> <!-- Makes text contained in the tag as bold -->
|
||||
<em></em> and <i></i> <!-- Alternative way to make the text contained in the tag as italic -->
|
||||
<strike></strike> <!-- creates a strike through the text element -->
|
||||
<strike></strike> <!-- Creates a strike through the text element -->
|
||||
<pre></pre> <!-- Preformatted monospace text block with some spacing intact -->
|
||||
<blockquote></blockquote> <!-- Contains long paragraphs of quotations often cited -->
|
||||
<abbr></abbr> <!-- Contains abbreviations while also making the full form avaialable -->
|
||||
<abbr></abbr> <!-- Contains abbreviations while also making the full form avaialable -->
|
||||
<address></address> <!-- Used to display contact information -->
|
||||
<code></code> <!-- Used to display inline code snippets -->
|
||||
|
||||
@ -54,13 +54,13 @@
|
||||
<a href="mailto:email@example.com"></a> <!-- Used to link to an email address -->
|
||||
<a href="name"></a> <!-- Used to link to a document element -->
|
||||
<a href="#name"></a> <!-- Used to link to specific div element -->
|
||||
<a href="tel://####-####-##"></a> <!-- Used to display phone numbers and make them as clickable -->
|
||||
<a href="tel://####-####-##"></a> <!-- Used to display phone numbers and make them clickable -->
|
||||
|
||||
|
||||
<!-- Image Formatting -->
|
||||
|
||||
|
||||
<img src="url" alt="text"> <!-- Used to display images in a webpage wehre src="url" contains the link to the image source and alt="" contains an alternative text to display wehn the image is not displayed -->
|
||||
<img src="url" alt="text"> <!-- Used to display images in a webpage where src="url" contains the link to the image source and alt="" contains an alternative text to display when the image is not displayed -->
|
||||
|
||||
|
||||
<!-- List Formatting -->
|
||||
@ -70,7 +70,7 @@
|
||||
<ul></ul> <!-- Used to display unordered lists with numbers in the items -->
|
||||
<li></li> <!-- Contains list items inside ordered and unordered lists -->
|
||||
<dl></dl> <!-- Contains list item definitions -->
|
||||
<dt></dt> <!-- definition of single term inline with body content -->
|
||||
<dt></dt> <!-- Definition of single term inline with body content -->
|
||||
<dd></dd> <!-- The descrpition of the defined term -->
|
||||
|
||||
|
||||
@ -80,12 +80,12 @@
|
||||
<form action="url"></form> <!-- Form element creates a form and action="" specifies where the data is to be sent to when the visitor submits the form -->
|
||||
|
||||
<!-- Supported attributes -->
|
||||
method="somefunction()" <!-- Contains the type of request (GET, POST... etc) which dictates how to send the data of the form -->
|
||||
method="somefunction()" <!-- Contains the type of request (GET, POST... etc) which dictates how to send the data of the form -->
|
||||
enctype="" <!-- Dictates how the data is to be encoded when the data is sent to the web server. -->
|
||||
autocomplete="" <!-- Specifies if the autocomplete functionality is enabled or not -->
|
||||
novalidate <!-- Dictates if the form will be validated or not -->
|
||||
accept-charset="" <!-- Identifies the character encoding upon form submission -->
|
||||
target="" <!-- Tell where to display the information upon form submission. POssible values: '_blank', '_self', '_parent', '_top' -->
|
||||
target="" <!-- Tell where to display the information upon form submission. Possible values: '_blank', '_self', '_parent', '_top' -->
|
||||
|
||||
<fieldset disabled="disabled"></fieldset> <!-- Identifies the group of all fields in the form -->
|
||||
<label for=""></label> <!-- A simple field label telling the user what to type in the field -->
|
||||
@ -105,16 +105,16 @@ step="" <!-- Identifies the legal numb
|
||||
<textarea name="" id="" cols="30" rows="10"> <!-- Specifies a large input text field for longer messages -->
|
||||
</textarea>
|
||||
|
||||
<select name=""></select> <!-- Describes a dropdown box for users to select from variety of ochoices-->
|
||||
<select name=""></select> <!-- Describes a dropdown box for users to select from variety of choices -->
|
||||
|
||||
<!-- Supported attributes -->
|
||||
name="" <!-- The name for a dropdown combination box -->
|
||||
size="" <!-- Specifies the number of available options -->
|
||||
size="" <!-- Specifies the number of available options -->
|
||||
multiple <!-- Allows for multiple option selections -->
|
||||
required <!-- Requires that a value is selected before submitting the form -->
|
||||
autofocus <!-- Specifies that the dropdown automatically comes to focus once the page loads -->
|
||||
autofocus <!-- Specifies that the dropdown automatically comes to focus once the page loads -->
|
||||
<optgroup></optgroup> <!-- Specifies the entire grouping of available options -->
|
||||
<option value=""></option> <!-- Defines one of the avaialble option from the dorpdown list-->
|
||||
<option value=""></option> <!-- Defines one of the avaialble option from the dropdown list -->
|
||||
<button></button> <!-- A clickable button to submit the form -->
|
||||
|
||||
|
||||
@ -136,17 +136,17 @@ autofocus <!-- Specifies that the dropd
|
||||
<!-- Objects and iFrames -->
|
||||
|
||||
|
||||
<object data=""></object> <!-- Describes and embed file type including audio, video, PDf's, images -->
|
||||
<object data=""></object> <!-- Describes and embed file type including audio, video, PDF's, images -->
|
||||
|
||||
<!-- Supported attributes -->
|
||||
type="" <!-- Describes the type of media embedded -->
|
||||
height="" <!-- Describes the height of the object in pixels -->
|
||||
height="" <!-- Describes the height of the object in pixels -->
|
||||
width="" <!-- Describes the width of the object in pixels -->
|
||||
usemap="" <!-- This is the name of the client-side image map in the object -->
|
||||
|
||||
<iframe src="" frameborder="0"></iframe> <!-- Contains an inline frame that allows to embed external information -->
|
||||
<embed src="" type=""> <!-- Acts as a container for external application or plug-in -->
|
||||
scr="" <!-- The source of the external file you're embedding -->
|
||||
src="" <!-- The source of the external file you're embedding -->
|
||||
width="" <!-- Describes the width of the iframe in pixels -->
|
||||
|
||||
|
||||
@ -155,7 +155,7 @@ width="" <!-- Describes the width of th
|
||||
|
||||
<header></header> <!-- Defines the header block for a document or a section -->
|
||||
<footer></footer> <!-- Defines the footer block for a document or a section -->
|
||||
<main></main> <!-- Describes the main content of a document-->
|
||||
<main></main> <!-- Describes the main content of a document -->
|
||||
<article></article> <!-- Identifies an article inside a document -->
|
||||
<aside></aside> <!-- Specifies content contained in a document sidebar -->
|
||||
<section></section> <!-- Defines a section of a document -->
|
||||
@ -177,7 +177,7 @@ width="" <!-- Describes the width of th
|
||||
<wbr> <!-- A line break within the content -->
|
||||
|
||||
|
||||
<!-- Collective CHaracter Obejcts -->
|
||||
<!-- Collective Character Obejcts -->
|
||||
|
||||
|
||||
" " Quotation Marks - "
|
||||
|
62
languages/XML.md
Normal file
62
languages/XML.md
Normal file
@ -0,0 +1,62 @@
|
||||
> announcement: this doc is a quiz-, interview-oriented cheatsheet, which desigend for those who want to have an overview of XML, when preparing for interviews.
|
||||
|
||||
# What is XML
|
||||
XML stands for eXtensible Markup Language, XML was designed to store and transport data. XML is often used for distributing data over the Internet(especial in web development).
|
||||
|
||||
# Then how can XML store data
|
||||
XML uses a DTD to describe the data.
|
||||
|
||||
# The relation with HTML
|
||||
* XML: is used to store or transport data.
|
||||
So the XML is a **Complement** to HTML.
|
||||
* HTML: is used to format and display the same data.
|
||||
|
||||
|
||||
XML does not carry any information about how to be displayed. The same XML data can be used in many different presentation scenarios.
|
||||
Because of this, with XML, there is a full separation between data and presentation.
|
||||
|
||||
# What is XML Schema/DTD
|
||||
The purpose of a DTD is to define the structure of an XML document. It defines the structure with a list of legal elements:
|
||||
|
||||
|
||||
# When Not to Use a XML DTD/Sschema
|
||||
XML does not require a DTD/Schema.
|
||||
|
||||
When you are experimenting with XML, or when you are working with small XML files, creating DTDs may be a waste of time.
|
||||
|
||||
If you develop applications, wait until the specification is stable before you add a document definition. Otherwise, your software might stop working because of validation errors.
|
||||
|
||||
|
||||
# XML Syntax
|
||||
The XML language has no predefined tags, but the syntax is rather logic and easy to learn. XML documents must contain one root element that is the parent of all other elements.
|
||||
|
||||
```
|
||||
<bookstore>
|
||||
<book category="children">
|
||||
<title>Harry Potter</title>
|
||||
<author>J K. Rowling</author>
|
||||
<year>2005</year>
|
||||
<price>29.99</price>
|
||||
</book>
|
||||
<book category="web">
|
||||
<title>Learning XML</title>
|
||||
<author>Erik T. Ray</author>
|
||||
<year>2003</year>
|
||||
<price>39.95</price>
|
||||
</book>
|
||||
</bookstore>
|
||||
```
|
||||
|
||||
1. XML Tags are Case Sensitive
|
||||
2. All XML Elements Must Have a Closeing Tag
|
||||
|
||||
```
|
||||
<p>This is a paragraph.</p>
|
||||
<br /> <!-- This is a self closing -->
|
||||
```
|
||||
3. XML Attribute Values Must Always be Quoted
|
||||
4. Pay attention to the name rules.
|
||||
|
||||
# Reference
|
||||
1. (W3School) [https://www.w3schools.com/xml/]
|
||||
2. [cheat sheet in German](https://www.i-d-e.de/wp-content/uploads/2015/02/ide-xml-kurzreferenz.pdf)
|
@ -1,9 +1,8 @@
|
||||
#!/bin/bash
|
||||
##############################################################################
|
||||
# SHORTCUTS
|
||||
# SHORTCUTS and HISTORY
|
||||
##############################################################################
|
||||
|
||||
|
||||
CTRL+A # move to beginning of line
|
||||
CTRL+B # moves backward one character
|
||||
CTRL+C # halts the current command
|
||||
@ -11,6 +10,7 @@ CTRL+D # deletes one character backward or logs out of current session, similar
|
||||
CTRL+E # moves to end of line
|
||||
CTRL+F # moves forward one character
|
||||
CTRL+G # aborts the current editing command and ring the terminal bell
|
||||
CTRL+H # deletes one character under cursor (same as DELETE)
|
||||
CTRL+J # same as RETURN
|
||||
CTRL+K # deletes (kill) forward to end of line
|
||||
CTRL+L # clears screen and redisplay the line
|
||||
@ -31,10 +31,17 @@ CTRL+Z # stops the current command, resume with fg in the foreground or bg in t
|
||||
ALT+B # moves backward one word
|
||||
ALT+D # deletes next word
|
||||
ALT+F # moves forward one word
|
||||
ALT+H # deletes one character backward
|
||||
|
||||
DELETE # deletes one character backward
|
||||
!! # repeats the last command
|
||||
exit # logs out of current session
|
||||
BACKSPACE # deletes one character backward
|
||||
DELETE # deletes one character under cursor
|
||||
|
||||
history # shows command line history
|
||||
!! # repeats the last command
|
||||
!<n> # refers to command line 'n'
|
||||
!<string> # refers to command starting with 'string'
|
||||
|
||||
exit # logs out of current session
|
||||
|
||||
|
||||
##############################################################################
|
||||
@ -47,7 +54,7 @@ echo $SHELL # displays the shell you're using
|
||||
echo $BASH_VERSION # displays bash version
|
||||
|
||||
bash # if you want to use bash (type exit to go back to your previously opened shell)
|
||||
whereis bash # finds out where bash is on your system
|
||||
whereis bash # locates the binary, source and manual-page for a command
|
||||
which bash # finds out which program is executed as 'bash' (default: /bin/bash, can change across environments)
|
||||
|
||||
clear # clears content on window (hide displayed lines)
|
||||
|
@ -232,6 +232,8 @@ n repeat search in same direction
|
||||
N repeat search in opposite direction
|
||||
* search forward, word under cursor
|
||||
# search backward, word under cursor
|
||||
set ic ignore case: turn on
|
||||
set noic ignore case: turn off
|
||||
:%s/old/new/g replace all old with new throughout file
|
||||
:%s/old/new/gc replace all old with new throughout file with confirmation
|
||||
:argdo %s/old/new/gc | wq open multiple files and run this command to replace old
|
||||
@ -251,6 +253,8 @@ N repeat search in opposite direction
|
||||
:bd delete a buffer (close a file)
|
||||
:b1 show buffer 1
|
||||
:b vimrc show buffer whose filename begins with "vimrc"
|
||||
:bufdo <command> run 'command(s)' in all buffers
|
||||
:[range]bufdo <command> run 'command(s)' for buffers in 'range'
|
||||
|
||||
|
||||
##############################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user