-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1163 lines (1035 loc) · 34.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="This is html cheat sheet">
<meta name="keywords" content="HTML, cheatsheet, codes">
<meta name="author" content="Sagar Sharma">
<title>Cheat Sheet</title>
<link rel="shortcut icon" href="./public/img/logo.png" type="image/png">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" integrity="sha512-PgQMlq+nqFLV4ylk1gwUOgm6CtIIXkKwaIHp/PAIWHzig/lKZSEGKEysh0TCVbHJXCLN7WetD8TFecIky75ZfQ==" crossorigin="anonymous" />
<link rel="stylesheet" href="./public/css/prism.css">
<link rel="stylesheet" href="./public/css/style.css">
</head>
<body>
<div class="title">
<h1 style="color: #fff; text-align: center;">Cheat Sheet</h1>
</div>
<div class="verticalNav">
<a href="#html"><img src="./public/img/html.png" alt="html" title="HTML"></a><br>
<a href="#css"><img src="./public/img/css.png" alt="css" title="CSS"></a><br>
<a href="#bootstrap"><img src="./public/img/bootstrap.png" alt="bootstrap" title="Bootstrap"></a><br>
<a href="#js"><img src="./public/img/js.png" alt="js" title="JavaScript"></a><br>
<a href="#jquery"><img src="./public/img/jquery.png" alt="jQuery" title="jQuery"></a><br>
<a href="#node"><img src="./public/img/node.png" alt="node" title="NodeJs"></a><br>
<a href="#express"><img src="./public/img/express.png" alt="express" title="ExpressJS"></a><br>
<a href="#mongoose"><img src="./public/img/mongoose.png" alt="mongoose" title="Mongoose"></a>
</div>
<div class="container">
<h1 class="heading">
<a name="html">HTML Cheat Sheet</a>
</h1>
<br>
<ul>
<b>
<li>
HTML starter template:
<pre class="language-html">
<code><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html></code>
</pre>
</li>
<br>
<li>
Different types of Input:
<pre class="language-html">
<code><input type="text">
<input type="password">
<input type="submit">
<input type="reset">
<input type="radio">
<input type="checkbox">
<input type="button">
<input type="file">
<input type="image">
<input type="color">
<input type="datetime-local">
<input type="email">
<input type="month">
<input type="number">
<input type="url">
<input type="week">
<input type="search">
<input type="tel">
<input type="range"></code>
</pre>
</li>
<br>
<li>
All meta tags
<pre class="language-html">
<code><head>
<meta charset="UTF-8">
<meta name="description" content="This is html cheat sheet">
<meta name="keywords" content="HTML, cheatsheet, codes">
<meta name="author" content="Sagar Sharma">
<meta http-equiv = "refresh" content = "5">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head></code>
</pre>
</li>
<br>
<li>
Sample Paragraph Text
<pre class="language-html">
<code><p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Est dolor beatae perfer
endis expedita accusamus dolorem, rem explicabo aliquam magnam inventore
dignissimos harum repellendus voluptates vero quibusdam quas laborum
accusantium facilis! Sit labore animi quisquam quod, accusantium ut repudiand
ae omnis aspernatur voluptates ducimus, quos, dolorum distinctio beatae explica.
Rerum, sint aspernatur fuga est, itaque nulla, dolorem iure fugiat maiores dolor a
Quaerat, ab! Deleniti, iure molestiae aliquam eveniet doloribus officia ipsum acc
usantium possimus dolor, voluptatem ipsam? Voluptas vero quasi iste nihil. Aliquam
pariatur fugit ad nihil iste placeat libero, quibusdam atque? inctio consequatur
ad veniam fugiat quos unde ratione velit, expedita dolorum quaerat atque tenetur
iure molestias temporibus cupiditate sequi harum itaque officia, omnis officiis m
</p>
</code></pre>
</li>
<br>
<li>
HTML colors hex codes:
<pre class="language-html"><code>https://sagar-sharma-7.github.io/Color-Palette/</code></pre>
<a href="https://sagar-sharma-7.github.io/Color-Palette/" target="_blank">Click Here</a>
</li>
</b>
</ul>
<br>
<br>
<h1 class="heading">
<a name="css">CSS Cheat Sheet</a>
</h1>
<br>
<ul>
<b>
<li>
Linking CSS file in HTMLfile
<pre class="language-html">
<code><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
</body>
</html>
</code>
</pre>
</li>
<br>
<li>
Starting with CSS
<pre class="language-css">
<code>*{
margin: 0;
padding: 0;
box-sizing: border-box;
}</code>
</pre>
</li>
<br>
<li>
Getting everything in center and middle
<pre class="language-css">
<code>div{
display: flex;
justify-content: center;
align-items: center;
}</code>
</pre>
</li>
<br>
<li>
Anchor Pseudo-classes
<pre class="language-css">
<code>/* unvisited link */
a:link {
color: #FF0000;
}
/* visited link */
a:visited {
color: #00FF00;
}
/* mouse over link */
a:hover {
color: #FF00FF;
}
/* selected link */
a:active {
color: #0000FF;
}</code>
</pre>
</li>
<br>
<li>
Custom Scrollbar
<pre class="language-css">
<code>/* width */
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: #000;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #fff;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
/* Up and Down Button*/
::-webkit-scrollbar-button{
background-color: #000;
}</code>
</pre>
</li>
<br>
<li>
Placeholder Color
<pre class="language-css">
<code>::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
color: red;
opacity: 1; /* Firefox */
}
:-ms-input-placeholder { /* Internet Explorer 10-11 */
color: red;
}
::-ms-input-placeholder { /* Microsoft Edge */
color: red;
}</code>
</pre>
</li>
<br>
<li>
Text Selection Color
<pre class="language-css">
<code>::-moz-selection { /* Code for Firefox */
color: red;
background: yellow;
}
::selection {
color: red;
background: yellow;
}</code>
</pre>
</li>
<br>
<li>
Change Bullet Color
<pre class="language-css">
<code>ul {
list-style: none; /* Remove default bullets */
}
ul li::before {
content: "\2022"; /* Content: \2022 is the CSS Code/unicode for a bullet */
color: red; /* Change the color */
font-weight: bold; /* If you want it to be bold */
display: inline-block; /* Add space between the bullet and the text */
width: 1em; /* Also needed for space (tweak if needed) */
margin-left: -1em; /* Also needed for space (tweak if needed) */
}</code>
</pre>
</li>
<br>
<li>
Media Query
<pre class="language-css">
<code>/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
}
/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
}
/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
}
/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
}
/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
}</code>
</pre>
</li>
<br>
<li>
Keyframes
<pre class="language-css">
<code>@keyframes anmation {
0% {
}
25% {
}
50% {
}
75% {
}
100% {
}
}</code>
</pre>
</li>
</b>
</ul>
<br>
<br>
<h1 class="heading">
<a name='bootstrap'>Bootstrap Cheat Sheet</a>
</h1>
<br>
<ul>
<b>
<li>
Bootstrap starter template
<pre class="language-html">
<code><!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
<h1>Hello, world!</h1>
<!-- Optional JavaScript; choose one of the two! -->
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js" integrity="sha384-q2kxQ16AaE6UbzuKqyBE9/u/KzioAlnx2maXQHiDX9d4/zp8Ok3f+M7DPm+Ib6IU" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.min.js" integrity="sha384-pQQkAEnwaBkjpqZ8RU1fF1AKtTcHJwFl3pblpTlHXybJjHpMYo79HY3hIi4NKxyj" crossorigin="anonymous"></script>
-->
</body>
</html></code>
</pre>
</li>
<br>
<li>
Alerts
<pre class="language-html">
<code><div class="alert alert-primary" role="alert">
A simple primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-secondary" role="alert">
A simple secondary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-success" role="alert">
A simple success alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-danger" role="alert">
A simple danger alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-warning" role="alert">
A simple warning alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-info" role="alert">
A simple info alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-light" role="alert">
A simple light alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-dark" role="alert">
A simple dark alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div></code>
</pre>
</li>
<br>
<li>
Additional content in alert
<pre class="language-html">
<code><div class="alert alert-success" role="alert">
<h4 class="alert-heading">Well done!</h4>
<p>
Aww yeah, you successfully read this important alert message.
This example text is going to run a bit longer so that you can see
how spacing within an alert works with this kind of content.
</p>
<hr>
<p class="mb-0">
Whenever you need to, be sure to use margin utilities to keep things
nice and tidy.
</p>
</div></code>
</pre>
</li>
<br>
<li>
Dismissing alert
<pre class="language-html">
<code><div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>Holy guacamole!</strong>
You should check in on some of those fields below.
<button type="button"
class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div></code>
</pre>
</li>
<br>
<li>
Buttons
<pre class="language-html">
<code><button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-secondary">Secondary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-light">Light</button>
<button type="button" class="btn btn-dark">Dark</button>
<button type="button" class="btn btn-link">Link</button></code>
</pre>
</li>
<br>
<li>
Outline buttons
<pre class="language-html">
<code><button type="button" class="btn btn-outline-primary">Primary</button>
<button type="button" class="btn btn-outline-secondary">Secondary</button>
<button type="button" class="btn btn-outline-success">Success</button>
<button type="button" class="btn btn-outline-danger">Danger</button>
<button type="button" class="btn btn-outline-warning">Warning</button>
<button type="button" class="btn btn-outline-info">Info</button>
<button type="button" class="btn btn-outline-light">Light</button>
<button type="button" class="btn btn-outline-dark">Dark</button></code>
</pre>
</li>
<br>
<li>
Changing size of button
<pre class="language-html">
<code><button type="button" class="btn btn-primary btn-lg">Large button</button>
<button type="button" class="btn btn-secondary btn-lg">Large button</button>
<button type="button" class="btn btn-primary btn-sm">Small button</button>
<button type="button" class="btn btn-secondary btn-sm">Small button</button></code>
</pre>
</li>
<br>
<li>
Block button
<pre class="language-html">
<code><button type="button" class="btn btn-primary btn-block">
Block button
</button>
<button type="button" class="btn btn-secondary btn-lg btn-block">
Block button
</button></code>
</pre>
</li>
<br>
<li>
Button group
<pre class="language-html">
<code><div class="btn-group">
<a href="#" class="btn btn-primary active" aria-current="page">Active link</a>
<a href="#" class="btn btn-primary">Link</a>
<a href="#" class="btn btn-primary">Link</a>
</div></code>
</pre>
</li>
<br>
<li>
Checkbox button group
<pre class="language-html">
<code><div class="btn-group" role="group" aria-label="Basic radio toggle button group">
<input type="radio" class="btn-check" name="btnradio" id="btnradio1" autocomplete="off" checked>
<label class="btn btn-outline-primary" for="btnradio1">Radio 1</label>
<input type="radio" class="btn-check" name="btnradio" id="btnradio2" autocomplete="off">
<label class="btn btn-outline-primary" for="btnradio2">Radio 2</label>
<input type="radio" class="btn-check" name="btnradio" id="btnradio3" autocomplete="off">
<label class="btn btn-outline-primary" for="btnradio3">Radio 3</label>
</div></code>
</pre>
</li>
<br>
<li>
Radio button group
<pre class="language-html">
<code><div class="btn-group" role="group" aria-label="Basic radio toggle button group">
<input type="radio" class="btn-check" name="btnradio" id="btnradio1" autocomplete="off" checked>
<label class="btn btn-outline-primary" for="btnradio1">Radio 1</label>
<input type="radio" class="btn-check" name="btnradio" id="btnradio2" autocomplete="off">
<label class="btn btn-outline-primary" for="btnradio2">Radio 2</label>
<input type="radio" class="btn-check" name="btnradio" id="btnradio3" autocomplete="off">
<label class="btn btn-outline-primary" for="btnradio3">Radio 3</label>
</div></code>
</pre>
</li>
<br>
<li>
Button toolbar
<pre class="language-html">
<code><div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
<div class="btn-group me-2" role="group" aria-label="First group">
<button type="button" class="btn btn-primary">1</button>
<button type="button" class="btn btn-primary">2</button>
<button type="button" class="btn btn-primary">3</button>
<button type="button" class="btn btn-primary">4</button>
</div>
<div class="btn-group me-2" role="group" aria-label="Second group">
<button type="button" class="btn btn-secondary">5</button>
<button type="button" class="btn btn-secondary">6</button>
<button type="button" class="btn btn-secondary">7</button>
</div>
<div class="btn-group" role="group" aria-label="Third group">
<button type="button" class="btn btn-info">8</button>
</div>
</div></code>
</pre>
</li>
<br>
<li>
Navbar
<pre class="language-html">
<code><nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-link active" aria-current="page" href="#">Home</a>
<a class="nav-link" href="#">Features</a>
<a class="nav-link" href="#">Pricing</a>
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</div>
</div>
</div>
</nav></code>
</pre>
</li>
<br>
<li>
Navbar with search and drop down
<pre class="language-html">
<code><nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Dropdown
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
</div>
</div>
</nav></code>
</pre>
</li>
<br>
<li>
Progress bar
<pre class="language-html">
<code><div class="progress">
<div class="progress-bar bg-success" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div>
</div>
<div class="progress">
<div class="progress-bar bg-info" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar bg-warning" role="progressbar" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">75%</div>
</div>
<div class="progress">
<div class="progress-bar bg-danger" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div></code>
</pre>
</li>
<br>
<li>
Multiple bars
<pre class="language-html">
<code><div class="progress">
<div class="progress-bar" role="progressbar" style="width: 15%" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
<div class="progress-bar bg-success" role="progressbar" style="width: 30%" aria-valuenow="30" aria-valuemin="0" aria-valuemax="100"></div>
<div class="progress-bar bg-info" role="progressbar" style="width: 20%" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"></div>
</div></code>
</pre>
</li>
<br>
<li>
Striped bars
<pre class="language-html">
<code><div class="progress">
<div class="progress-bar progress-bar-striped" role="progressbar" style="width: 10%" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-striped bg-success" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-striped bg-info" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-striped bg-warning" role="progressbar" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-striped bg-danger" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div></code>
</pre>
</li>
<br>
<li>
Animated striped bar
<pre class="language-html">
<code><div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 75%"></div>
</div></code>
</pre>
</li>
</b>
</ul>
<br>
<br>
<h1 class="heading">
<a name='js'>JavaScript Cheat Sheet</a>
</h1>
<br>
<ul>
<b>
<li>
Array of months
<pre class="language-js">
<code>let monthsList= [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
];
let monthsList = [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
];</code>
</pre>
</li>
<br>
<li>
Array of days
<pre class="language-js">
<code>let daysList = [
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday'
];
let daysList = [
'Sun',
'Mon',
'Tue',
'Wed',
'Thu',
'Fri',
'Sat'
];</code>
</pre>
</li>
<br>
<li>
Time
<pre class="language-js">
<code>const date = new Date();
let hours = date.getHours();
let min = date.getMinutes();
let sec = date.getSeconds();
let millisec = date.getMilliseconds();</code>
</pre>
</li>
<br>
<li>
Live time
<pre class="language-js">
<code>setInterval(() => {
const date = new Date();
let hours = date.getHours();
let min = date.getMinutes();
let sec = date.getSeconds();
let millisec = date.getMilliseconds();
}, 1000);</code>
</pre>
</li>
<br>
<li>
if else and else if statement
<pre class="language-js">
<code>if (condition) {
} else if (condition) {
} else if (condition) {
} else if (condition) {
} else if (condition) {
} else {
}</code>
</pre>
</li>
<br>
<li>
Switch statement format
<pre class="language-js">
<code>let variable;
switch (key) {
case value:
variable = ;
break;
case value:
variable = ;
break;
case value:
variable = ;
break;
case value:
variable = ;
break;
case value:
variable = ;
break;
}</code>
</pre>
</li>
<br>
<li>
Day with switch statement
<pre class="language-js">
<code>let day;
switch (new Date().getDay()) {
case 0:
day = "Sunday";
break;
case 1:
day = "Monday";
break;
case 2:
day = "Tuesday";
break;
case 3:
day = "Wednesday";
break;
case 4:
day = "Thursday";
break;
case 5:
day = "Friday";
break;
case 6:
day = "Saturday";
}
document.getElementById("demo").innerHTML = "Today is " + day;</code>
</pre>
</li>
<br>
<li>
Months with switch statement
<pre class="language-js">
<code>let month;
switch (new Date().getMonth()) {
case 0:
month = "January";
break;
case 1:
month = "February";
break;
case 2:
month = "March";
break;
case 3:
month = "April";
break;
case 4:
month = "May";
break;
case 5:
month = "June";
break;
case 6:
month = "July";
break;
case 7:
month = "August";
break;
case 8:
month = "September";
break;
case 9:
month = "October";
break;
case 10:
month = "November";
break;
case 11:
month = "December";
}</code>
</pre>
</li>
</b>
</ul>
<br>
<br>
<h1 class="heading">
<a name='jquery'>jQuery Cheat Sheet</a>
</h1>
<br>
<ul>
<b>
<li>
jQuery CDN
<pre class="language-html">
<code><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script></code>
</pre>
</li>
<br>
<li>
jQuery syntax
<pre class="language-js">
<code>$(document).ready(function(){
// jQuery methods go here...
});
/* The jQuery team has also created an even
shorter method for the document ready event:*/
$(function(){
// jQuery methods go here...
});</code>
</pre>
</li>
</b>
</ul>
<br>
<br>
<h1 class="heading">
<a name="node">Node.js Cheat Sheet</a>
</h1>
<br>
<ul>
<b>
<li>
Modules
<pre class="language-js">
<code>const http = require("http");
const fs = require("fs");
const path = require("path");
const os = require("os");
const url = require("url");</code>
</pre>
</li>
<br>
<li>
Creating http server
<pre class="language-js">
<code>const http = require("http");
const port = 8000;
const server = http.createServer((req, res) => {
// res.writeHead(200, {"Content-type": "text/html"})
res.write("Hello World");
res.end();
});
server.listen(port, "127.0.0.1", () => {
console.log("server is live now!!!");
});</code>
</pre>