// jQuery
$(document).ready(function() {
// code
})
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //pass a query param | |
| onNavigate(){ | |
| this.router.navigate(['/'],{queryParams:{"analytics":100}}); | |
| } | |
| //get a query param in that component, here it is / so it refers to main or home compnent | |
| import { Component, OnInit,OnDestroy } from '@angular/core'; | |
| import {Router} from '@angular/router'; | |
| import {Subscription} from 'rxjs/Rx'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git add '*.txt' | |
| git log: gives a committed with author and date | |
| git remote add origin https://github.com/try-git/try_git.git | |
| git push -u origin master | |
| git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. At terminal go to addon project, | |
| npm link | |
| 2. Go to project where you want to use addon | |
| npm link addon-name | |
| npm install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In AWS Console | |
| 1. Create a bucket | |
| 1.1 name a bucket as domain for easy purpose | |
| 2. Go to properties of bucket | |
| 2.1. Go to edit bucket policy | |
| - in text editor, edit a resource key with your domain name after :: | |
| 2.2. Go to static web hosting | |
| - Enable a webhosting option | |
| 2.2.1. There is a endpoint link which is used to point your bucket to domain |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The ssh way | |
| Assuming that you have ssh on your ubuntu box. | |
| Minikube user: docker password: tcuser | |
| First run kubectl proxy & to expose the dashboard on http://localhost:8001 | |
| Then expose the dashboard using ssh's port forwarding, executing: | |
| ssh -R 30000:127.0.0.1:8001 [email protected] |
- Explain event in JS and event delegation
- Explain how
thisworks in JavaScript - Explain how prototypal inheritance works
- Explain IFE
- What's the difference between a variable that is:
null,undefinedor undeclared? - What is a closure, and how/why would you use one?
- What's the difference between
.calland.apply? - Explain Ajax .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var app = require("express")(); | |
| var http = require("http").Server(app); | |
| var io = require("socket.io")(http); | |
| var Usercounter = 0; | |
| app.get("/", function(req, res) { | |
| res.sendFile(__dirname + "/index.html"); | |
| }); |