├── .github └── ISSUE_TEMPLATE │ └── new-cheat-sheet-request.md ├── ada.md ├── adb.md ├── alias.md ├── android-versions.md ├── angular.md ├── arrow-functions.md ├── assembly.md ├── async-http-client.md ├── axios.md ├── azure.md ├── bash.md ├── bcryptjs.md ├── c.md ├── cat.md ├── cd.md ├── challenges-code-preloads.md ├── chmod.md ├── cksum.md ├── cmp.md ├── comm.md ├── commonlisp.md ├── cp.md ├── cpp.md ├── cron.md ├── crontab.md ├── csharp.md ├── css.md ├── curl.md ├── cut.md ├── d.md ├── dart.md ├── dns.md ├── docker.md ├── dockerfile.md ├── dotenv.md ├── echo.md ├── ejs-embedded-javascript-templates.md ├── elixir.md ├── erlang.md ├── es2csv.md ├── express.md ├── figma.md ├── find.md ├── flutter.md ├── fortran.md ├── fsharp.md ├── git.md ├── go.md ├── google-analytics.md ├── google-nexus-screen-resolutions.md ├── google-pixel-screen-resolutions.md ├── grep.md ├── groovy-http-calls.md ├── groovy.md ├── gson.md ├── haskell.md ├── head.md ├── heroku.md ├── homebrew.md ├── html.md ├── http-staus-codes.md ├── iphone-screen-resolutions.md ├── java-primitive-data-types.md ├── java-strings.md ├── java-versions.md ├── java.md ├── javascript-fetch.md ├── javascript-versions.md ├── javascript.md ├── jest.md ├── jquery.md ├── jshell.md ├── jsonata.md ├── jsoup.md ├── kill.md ├── kubernetes.md ├── link.md ├── linux.md ├── lodash.md ├── ls.md ├── lua.md ├── make.md ├── man.md ├── markdown.md ├── maven.md ├── mkdir.md ├── mongodb.md ├── mv.md ├── mysql.md ├── netlify.md ├── nodejs.md ├── nodemon.md ├── ocaml.md ├── okhttp.md ├── onecompiler-apis.md ├── onecompiler-enterprise-apis.md ├── perl.md ├── php.md ├── pm2.md ├── prop-types.md ├── ps.md ├── pwd.md ├── python.md ├── r.md ├── racket.md ├── react-helmet.md ├── react-prerequisites.md ├── reactjs.md ├── redis.md ├── request.md ├── rm.md ├── rmdir.md ├── ruby.md ├── rust.md ├── scala.md ├── scp.md ├── search-engins.md ├── solidity.md ├── sql.md ├── super-csv.md ├── tail.md ├── tar-gz.md ├── tcl.md ├── typescript.md ├── underscore.md ├── vb.md ├── vuejs.md ├── vyper.md ├── wc.md ├── windows-shortcuts.md └── yaml.md /.github/ISSUE_TEMPLATE/new-cheat-sheet-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New Cheat Sheet Request 3 | about: Suggest a missing Cheat Sheet 4 | title: New Cheat Sheet Request - [Cheat Sheet Title] 5 | labels: New Cheat Sheet 6 | assignees: '' 7 | 8 | --- 9 | 10 | Add more details about the requested Cheat Sheet like reference links etc., 11 | -------------------------------------------------------------------------------- /ada.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Ada 3 | description: Ada Programming language cheatsheet contains useful code syntax with examples which is handy while coding. 4 | created: 2020-06-24 5 | updated: 2024-02-05 6 | --- 7 | 8 | ## Data types 9 | 10 | * Strongly typed 11 | 12 | | Types | Data-type| 13 | |----|----| 14 | |Basic | Integer, Character, Float, Long_Float, Short_Integer, Long_Integer, etc | 15 | |Pointer | access | 16 | |Composite | array, String | 17 | |User Defined Data Type | record, enumeration, tagged type, variant record, range types, etc. | 18 | 19 | 20 | ### Naming convention 21 | * First character in identifier is a letter, then letters (both uppercase and lowercase letters), digits and underscore(`_`). 22 | * Case insensitive 23 | 24 | ## Arrays 25 | 26 | ```ada 27 | array-name : array (Fist..Last) of element-type; -- one-dimensional Array 28 | array-name : array (Fist1..Last1, First2..Last2) of element-type; -- two-dimensional Array 29 | ``` 30 | ## String 31 | 32 | It is an array of Character. 33 | 34 | ```ada 35 | My_String := String := "abcde"; -- string declaration 36 | ``` 37 | 38 | ## Literals or Constants 39 | |Literal | Example| 40 | |----|----| 41 | |Integer Literal- decimal|255| 42 | |Integer Literal- octal|8#377#| 43 | |Integer Literal- hexadecimal|16#FF#| 44 | |Float point Literal|53.0, 79e-6| 45 | |Character literals| 'a', '1'| 46 | |String literals| "OneCompiler", "Foo"| 47 | |Boolean literals| True, False| 48 | 49 | ### Special characters 50 | Special characters are defined as constans in `ASCII` or `Ada.Characters.Latin_1` package. 51 | |Constant| Description| 52 | |----|----| 53 | |LF | New line| 54 | |CR | Carriage Return| 55 | |HT | Horizontal tab| 56 | |VT | Vertical tab| 57 | |NUL | Null character| 58 | 59 | ## Operators 60 | 61 | | Operator type | Description| 62 | |----|-----| 63 | | Arithmetic Operator|+ , - , * , / , `**` (exponentiation)| 64 | | Relational Operator| < , > , <= , >=, /= , =| 65 | | Logical Operator| `and` , `or`, `xor`, `not` | 66 | | Assignment Operator| := | 67 | | If expression| (if a then b else c) | 68 | 69 | ## Sample program 70 | 71 | ```ada 72 | with Ada.Text_IO; use Ada.Text_IO; 73 | procedure Hello is 74 | begin 75 | Put_Line ("Hello, World!"); 76 | end Hello; 77 | ``` 78 | * `Ada.Text_IO` : package that contains routines for I/O of text. 79 | * `with` : tells compiler that the package will be used. 80 | * `use` : tells compiler that the package should be automatically searched and allows access to routines without using the fully qualified name. 81 | * `procedure` : used to declare a procedure named Hello here. 82 | * `Put_Line` : is a procedure for string output. 83 | * `--` : comment. 84 | 85 | ## Variables 86 | 87 | ```ada 88 | varName : DataType := value; 89 | ``` 90 | ## Constants 91 | ```ada 92 | varName : constant DataType := value; 93 | ``` 94 | ## Conditional Statements 95 | 96 | ### 1. If-else 97 | ```ada 98 | if conditional-expr then 99 | --code if above statement is true 100 | elseif conditional-expr then 101 | --code if above statement is true 102 | end if; 103 | ``` 104 | 105 | ### 2. Case 106 | ```ada 107 | case expr is 108 | when expr => --code 109 | when expr => --code 110 | ... 111 | when others => --code; 112 | end case; 113 | ``` 114 | ## Loops 115 | 116 | ### 1. Infinite loop: 117 | 118 | This is the simplest loop 119 | 120 | ```ada 121 | Index := 1; --initialization 122 | loop 123 | --code 124 | exit when Index = n; 125 | end loop; 126 | ``` 127 | ### 2. while loop 128 | 129 | ```ada 130 | Count := 1; --initialization 131 | while Count < n loop 132 | --code 133 | end loop; 134 | ``` 135 | 136 | ### 3. for loop 137 | 138 | ```ada 139 | for Index in 1..n loop 140 | --code 141 | end loop; 142 | ``` 143 | ## Sub programs 144 | 145 | Functions and procedures are collectively called as sub-programs. 146 | 147 | ### Syntax for procedures 148 | 149 | ```ada 150 | procedure proc_name 151 | (X : in Integer ; Y : out Integer ; Z : in out Integer ) is 152 | begin 153 | X := 10; −− it's an Error as you can’t modify an in parameter. 154 | Y := X; −− can modify Y as it's an out parameter. 155 | Z := Z + 1; −− can read and write as it's an in out parameter. 156 | end proc_name; 157 | ``` 158 | ### Syntax for functions 159 | 160 | ```ada 161 | function function_name(parameter : parameter_type) return value is 162 | begin 163 | --code 164 | end function_name; 165 | ``` 166 | -------------------------------------------------------------------------------- /adb.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ADB (Android Debug Bridge) 3 | description: Android Debug Bridge command-line tool helps us to interact with connected Android device/ Emulator. We can install, debug apps using ADB 4 | created: 2019-06-17 5 | updated: 2023-10-12 6 | --- 7 | 8 | ## Selecting Device 9 | 10 | |Command|Description| 11 | |---|---| 12 | |`adb devices`|This command is used to retrieve all devices by serial number| 13 | |`adb devices -l`|List of devices by product/model| 14 | |`adb -s `|Use the -s option followed by a device name to select on which device the adb command should run. The -s options should be first in line, before the command.| 15 | 16 | ## App installation & uninstallation 17 | |Command|Description| 18 | |---|---| 19 | |`adb install `|Install app| 20 | |`adb shell pm install `|Install app from phone path| 21 | |`adb shell pm install -r `|Reinstall app from phone path| 22 | |`adb uninstall `|Remove the app| 23 | 24 | ## App info 25 | |Command|Description| 26 | |---|---| 27 | |`adb shell pm list packages`|List package names| 28 | |`adb shell pm list packages -f`|as above + path tp APks| 29 | |`adb shell pm -3`| only third party packages| 30 | |`adb shell pm -s`|only system packages| 31 | |`adb shell pm -u`|also uninstalled packages| 32 | |`adb shell dumpsys package packages`|List info on all apps| 33 | |`adb shell pm dump name`|List info on one package| 34 | |`adb shell pm path package`|path to the APK file| 35 | 36 | 37 | ## Permissions 38 | |Command|Description| 39 | |---|---| 40 | |`adb shell pm permission groups`|Permission groups definitions| 41 | |`adb shell pm list permissions -g -f`|List permissions details| 42 | 43 | 44 | ## Common actions 45 | |Command|Description| 46 | |---|---| 47 | |`am start -a android.intent.action.VIEW -d URL`|To open the URL| 48 | 49 | 50 | ## Miscellaneous 51 | |Command|Description| 52 | |---|---| 53 | |`screencap -p .png`|Screenshot (saved on device)| 54 | |`screenrecord .mp4`|Screen capture (path on device)| 55 | 56 | ## Copy files to/from a device 57 | |Command|Description| 58 | |---|---| 59 | |`adb pull `|To copy a file or directory and its sub-directories from the device| 60 | |`adb push `|To copy a file or directory and its sub-directories to the device| 61 | 62 | Replace local and remote with the paths to the target files/directory on your development machine (local) and on the device (remote).For example:
63 | adb push foo.txt /sdcard/foo.txt 64 | 65 | ## ADB daemon 66 | |Command|Description| 67 | |---|---| 68 | |`adb kill-server`|Kill the server if it is running| 69 | |`adb start-server`|Ensure that there is a server running| 70 | |`adb root`|Restarts the adbd with root permissions| 71 | 72 | ## Steps to pair and connect to adb over wifi [Android 11+] 73 | 1. On device, go to developer settings and enable wireless debugging 74 | 1. Type `adb pair [ip]:[port]` and replace [ip] and [port] with the ip and port shown on the device 75 | 2. Then you will be asked for a pairing code.Enter that as shown on the device. 76 | 3. Now to connect type `adb connect [ip]:[port]` and replace [ip] and [port] with the the ip and port seen on the Wireless debugging page after closing the pairing dialog. 77 | -------------------------------------------------------------------------------- /alias.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: alias Linux Command 3 | description: alias command is used to create our own commands (command shortcuts) so that we don't have to remember/ type repeatedly used/ lengthy commands. 4 | created: 2019-08-23 5 | updated: 2019-08-23 6 | --- 7 | 8 | `alias` command is used to create our own commands (command shortcuts) so that we don't have to remember/ type repeatedly used/ lengthy commands. 9 | 10 | # Creating an alias 11 | Following is the syntax for creating an `alias` 12 | 13 | ```sh 14 | alias name=value 15 | ``` 16 | where the `name` is the new name you want to assign and `value` is the actual command. 17 | Lets take a realtime usecase so that we can understand easily. 18 | We will type `ls -al` frequently to list all files in a directory. Lets assign an alias `files` to the command so that you can simply type `files` instead typing `ls -al`. Following command creats the alias with name `files` for `ls- al` 19 | 20 | ```sh 21 | alias files='ls -al' 22 | ``` 23 | 24 | After runnng the about command we can simply type `files` to list all files & directories, instead typing `ls -al` 25 | 26 | # Listing all created aliases 27 | 28 | Following command lists all created aliases 29 | 30 | ```sh 31 | alias -p 32 | ``` 33 | ### Example 34 | 35 | ```sh 36 | $ alias -p 37 | alias files='ls -al' 38 | ``` 39 | 40 | # Deleting an alias 41 | We can delete an alias with name using following command 42 | 43 | ```sh 44 | unalias 45 | ``` 46 | 47 | # Deleting all aliases 48 | Following command removes all aliases that are created 49 | 50 | ```sh 51 | unalias -a 52 | ``` -------------------------------------------------------------------------------- /android-versions.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Android Versions 3 | description: Android Versions with release years and features added 4 | created: 2019-08-19 5 | updated: 2022-10-04 6 | color: #f4de50 7 | --- 8 | 9 | | Version | Year | Version Name (s) | Features added | 10 | |--------|--------|--------|--------| 11 | |1.0|September 23, 2008|Astroid|| 12 | |1.1|February 9, 2009|Petit Four|Longer in-call screen timeout, Ability to save attachments in messages, marquee in system layouts| 13 | |1.5|April 27, 2009 |Cupcake|Video recording and playback in MPEG-4 and 3GP formats, Animated screen transitions, Ability to upload videos to YouTube| 14 | |1.6|September 15, 2009|Donut|Voice and text entry search, multiple photos for deletion, WVGA screen resolutions| 15 | |2.0|October 26, 2009|Eclair|Contacts photo and select to call, SMS, or email the person, Bluetooth 2.1 support, new camera features| 16 | |2.2|May 20, 2010|Froyo|Speed, memory, and performance optimizations, USB tethering and Wi-Fi hotspot functionality, zoom gesture| 17 | |2.3|December 6, 2010|Gingerbread|native code development, New Download Manager, Support for multiple cameras on the device| 18 | |3.0|February 22, 2011|Honeycomb|holographic user interface, Added System Bar, Simplified multitasking| 19 | |4.0|October 18, 2011|Ice Cream Sandwich|Ability to access applications directly from lock screen, Face Unlock, Built-in photo editor| 20 | |4.1|July 9, 2012|Jelly Bean|Expandable notifications, Bluetooth data transfer for Android Beam, USB audio| 21 | |4.4|October 31, 2013|KitKat|Wireless printing capability[, Native infrared blaster API | 22 | |5.0|November 12, 2014|Lollipop|Project Volta, for battery life improvements, Smart lock feature | 23 | |6.0|October 5, 2015|Marshmallow|USB-C support, 4K display mode for apps, multi-window feature | 24 | |7.0|August 22, 2016|Nougat|Daydream virtual reality platform (VR interface), Vulkan 3D rendering API | 25 | |8.0|August 21, 2017|Oreo|Notification improvements, Multi-display support, Wi-Fi Assistant | 26 | |9.0|August 6, 2018|Pie|Rounded corners across the UI, Android Dashboard, Redesigned volume slider | 27 | |10|September 3, 2019|Q|New safeguards to protect user privacy that need to support in our app. | 28 | |11|September 8, 2020|Red Velvet Cake|Conversations, bubbles, device and media controls, 5G, biometric and more.| 29 | |12|October 4, 2021|Snow Cone|A new system UI that's expressive, dynamic, and personal. Extend your apps with redesigned widgets, AppSearch, Game Mode, and new codecs. | 30 | |13|August 15,2022|Tiramisu|Build for user privacy with photo picker and notification permission. Improve productivity with themed app icons, per-app languages, and clipboard preview. | 31 | -------------------------------------------------------------------------------- /angular.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Angular CheatSheet 3 | description: Angular cheatsheet contains basics of angular binding & angular CLI. 4 | created: 2022-10-03 5 | updated: 2022-10-03 6 | --- 7 | 8 | # Angular Cheatsheet 9 | 10 | Angular is an application-design framework and development platform for creating efficient and sophisticated single-page apps. 11 | 12 | #### Angular Binding: 13 | 14 | - One Way Binding: 15 | ``` 16 |

title

17 | //No changes were reflected back to the variable. 18 | ``` 19 | - Two Way Binding 20 | ``` 21 | 22 | //Changes were reflected back to the variable 23 | ``` 24 | - Property Binding 25 | ``` 26 | 27 | ``` 28 | - Attribute Binding 29 | ``` 30 |