#Github Mastering Markdown and Emoji Cheat Sheet
- Master Markdown skills through this guide : https://guides.github.com/features/mastering-markdown/
- Github Supported Emoji Cheat Sheet : https://www.webpagefx.com/tools/emoji-cheat-sheet/
#Github Mastering Markdown and Emoji Cheat Sheet
//8 Methods to Iterate through Array | |
//forEach (Do Operation for Each Item in the Array) | |
[1,2,3].forEach(function(item,index) { | |
console.log('item:',item,'index:',index); | |
}); | |
//map (Translate/Map all Elements in an Array to Another Set of Values.) | |
const oneArray = [1,2,3]; | |
const doubledArray = oneArray.map(function(item) { |
/*TO HIDE THE SCROLLBAR*/ | |
::-webkit-scrollbar { | |
display: none !important; | |
} |
//Upload Image on Amazon S3 using Angular JS | |
$scope.loadImage = function() { | |
var input = document.getElementById('imgId'); | |
var file = input.files[0]; | |
//-------------- UPLOAD IMAGE ON AMAZON S3 -----------------// | |
$scope.creds = { | |
bucket: 'bucket', | |
access_key: '123XYZ', |
//Regex for only Alphanumeric Characters with Space Included | |
var regex = new RegExp("^[a-zA-Z ]+$"); | |
//Verifying Contact Number | |
var contact = 1234567890; | |
var isnum = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.test(contact); | |
//You can Refer this site for more Regex or You can Create your own Regex : http://regexr.com/ |
<body> | |
<audio controls> | |
<source src="your_mp3_file" type="audio/mpeg"> | |
</audio> | |
<video width="100%" height="100%" controls> | |
<source src="your_video_url"> | |
</video> | |
</body> |
//indexOf always returns the original index in an ng-repeat | |
<div ng-repeat="image in images"> | |
{{images.indexOf(image)}} | |
</div> |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
Press minus + shift + s
and return
to chop/fold long lines!