$ docker
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
String methods: | |
concat() | |
endsWith() | |
includes() | |
indexOf() | |
lastIndexOf() | |
repeat() | |
replace() | |
search() |
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
Anime.js - https://animejs.com/ | |
Howler.js - https://howlerjs.com/ | |
Chart.js - https://www.chartjs.org/ | |
Reveal.js - https://revealjs.com | |
Three.js - https://threejs.org/ | |
Pixi.js - https://www.pixijs.com/ | |
Video.js - https://videojs.com/ |
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
Step1: Push all codes to the git hub | |
Step2: Add "hompage": "https://username.github.io/repository-name" after the scripts object in the packet.json | |
Step3: Add basename="/repository-name" to the mainRouter element | |
Step4: In cmd run the command "npm run build" that it will create the production built file inside the project folder. | |
Step5: Again run the command "npm install --save-dev gh-pages" that is used to publish the project. |
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
Publishing Procedure: | |
Step1: Run "npm build --prod". | |
Step2: install ghpage for angular cli by running "npm i -g angular-cli-ghpages" in cmd. | |
Step3: push the complete code to the github repository. | |
Step4: run ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/" command. |
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
sortArrObjects( | |
key: string, | |
order: string = 'asc', | |
isDate: boolean = false | |
) { | |
return (a, b) => { | |
if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) { | |
// if property doesn't exist on either object | |
return 0; | |
} |
Steps to deploy a Node.js app to Digital Ocean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
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
100+ Python challenging programming exercises | |
1. Level description | |
Level Description | |
Level 1 Beginner means someone who has just gone through an introductory Python course. He can solve some problems with 1 or 2 Python classes or functions. Normally, the answers could directly be found in the textbooks. | |
Level 2 Intermediate means someone who has just learned Python, but already has a relatively strong programming background from before. He should be able to solve problems which may involve 3 or 3 Python classes or functions. The answers cannot be directly be found in the textbooks. | |
Level 3 Advanced. He should use Python to solve more complex problem using more rich libraries functions and data structures and algorithms. He is supposed to solve the problem using several Python standard packages and advanced techniques. | |
2. Problem template |
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
JIT (Just-in-Time) - | |
1. JIT compiles our app in the browser at run-time. | |
2. Compiles before running | |
3. Each file compiled separately | |
4. No need to build after changing our app code and it automatically reflects the changes in your browser page | |
5. Highly secure | |
6. Very suitable for local development | |
AOT (Ahead-of-Time) - | |
1. AOT compiles our app code at build time. |