Clear windows command prompt

  • CTRL+L is pressed  or
  • write cls to the console and then hit ENTER
Advertisements

Regular Expression

A regular expression is a system used in programming for pattern matching. 
It could be used to text search and replacing. 

/./ Matche each and every single character

/\d+/ Matche any kind of digit one or more

/\w/ Matche anything a-z, 0-9, _

/\s/ Matche every space

/[a-z]+[3-9]+/ Character Set for matching
	example:
		coal547
		goal254		
		Boal
		Poal

/(\.in)?/ Basically it's for optional. Question mark to check whether 
it is or not of the preceding token


Look Around:
------------
? mark is not going to include in the result
= sign is going to match
! sign is not going to match

	example: Lookbehind
		price is $500
		price is €600
		(?<![$])(?<=€)\d+	
		(?<=€)   Positive Lookbehind
		(?<![$]) Negative Lookbehind
	
	example: Lookahead	
		sharthak.com
		harpikpandy.ru
		[a-z]+(?=\.com)
		(?=\.com) Positive Lookahead
		[a-z]{11}(?!\.com)
		(?!\.com) Negative Lookahead


Anchors:
--------
/com$/    $ match at last of the line
/^com/    ^ match at starting point of the line
/com\b/   b/ boundary of the line. it's serach for starting and the end

	example:
		google.com
		com.googula.name


Sublime 3


Multiple Same Word Selection:
-----------------------------
select and then ctr+d
 or 
ctr + mouse click 


Code Formating:
---------------
	Menually: Edit > Line > Reindent

	For key set:
		Preferences > key bindings
			[
				{
					"keys" : ["ctrl+shift+r"],
					"command" : "reindent"
				}
			]
	
	or

	when you paste something just do:
	ctrl+shift+v


Sublime Package:
----------------
ctr+shift+p
Install Package
	1. Emmet package
	2. SideBarEnhancements
	3. All AutoComplete
	4. Syntax Highlighting for Sass
	5. CodeFormatter

	
Amazing Emmet for Sublime. Just do it and hit the tab
.container>.row>table.table>(thead>th*3)+(tbody>tr*3>td*3)


Laravel Package:
----------------
ctr+shift+p
Install Package
	1. Blade Snippets
	2. Laravel Blade Highlighter


	
Wordpress Package:
----------------
ctr+shift+p
Install Package
	1. WordPress
	2. WooCommerce Autocomplete
	
	

JQuery Package:
---------------
ctr+shift+p
Install Package	
	1. JQuery


How to create virtual host in local machine

xampp > apache > conf > extra > httpd-vhosts.conf
line 20 you can see ##NameVirtualHost *:80
just remove ##
then add following code in 27 line

<VirtualHost *:80>
	DocumentRoot "e:/xampp/htdocs/folderName/public"
	ServerName folderName
</VirtualHost>	

then notepad Run as administrator file > open > (c:) > Windows > 
System32 > drivers > etc > hosts
add this
127.0.0.1 folderName

then restart xampp server Apache

now you can see http://folderName