Skip to content

Instantly share code, notes, and snippets.

View NishiGaba's full-sized avatar
:octocat:

Nishi Gaba NishiGaba

:octocat:
View GitHub Profile
@NishiGaba
NishiGaba / markdown.md
Last active October 10, 2017 09:13
Mastering Markdown and Emoji Cheat Sheet
@NishiGaba
NishiGaba / iterate-over-array.js
Last active November 29, 2023 10:27
8 Methods to Iterate through Array
//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) {
@NishiGaba
NishiGaba / scrollbar.css
Created July 4, 2017 10:47
Hide Scrollbar
/*TO HIDE THE SCROLLBAR*/
::-webkit-scrollbar {
display: none !important;
}
@NishiGaba
NishiGaba / upload_image.js
Last active August 1, 2017 07:14
Upload Image on Amazon S3
//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',
@NishiGaba
NishiGaba / regex.js
Last active August 1, 2017 07:15
Regex for different combinations in Javascript
//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/
@NishiGaba
NishiGaba / media_controls.html
Last active April 27, 2020 12:07
Hide Audio and Video Download Controls
<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>
@NishiGaba
NishiGaba / indexOf.js
Created July 19, 2017 12:32
Return original index in an ng-repeat through indexOf
//indexOf always returns the original index in an ng-repeat
<div ng-repeat="image in images">
{{images.indexOf(image)}}
</div>
@NishiGaba
NishiGaba / lamp.md
Last active February 26, 2018 14:37
LAMP setup on LINUX MINT or Ubuntu 16.04
@NishiGaba
NishiGaba / The Technical Interview Cheat Sheet.md
Created January 21, 2020 03:46 — forked from gauravmehla/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

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.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@NishiGaba
NishiGaba / README.md
Created January 21, 2020 03:52 — forked from hofmannsven/README.md
Git Cheatsheet