Skip to content

Instantly share code, notes, and snippets.

View rahulrsingh09's full-sized avatar

Rahul Singh rahulrsingh09

View GitHub Profile
@rahulrsingh09
rahulrsingh09 / gist:db3a68ff97d324801b889b82242f0554
Created December 21, 2021 08:25
AWS Bean Stalk Deployment for Node and TS
dist.sh
# If the directory, `dist`, doesn't exist, create `dist`
stat dist || mkdir dist
# Archive artifacts
zip dist/$npm_package_name.zip -r dist package.json package-lock.json
package.json
"scripts": {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="author" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.jsdelivr.net/npm/hls.js"></script>
<script src="https://unpkg.com/plyr@3"></script>
<script src="./script.js"></script>
<div class="container">
Try adjust different video quality to see it yourself
<video controls crossorigin playsinline >
<source
type="application/x-mpegURL"
src="https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>build</key>
<real>1087</real>
<key>license</key>
<dict>
<key>email</key>
<string>[email protected]</string>
module.exports = {
entry: {
main: path.resolve(__dirname, 'src/index.js'),
ProductList: path.resolve(__dirname, 'src/ProductList/ProductList.js'),
ProductPage: path.resolve(__dirname, 'src/ProductPage/ProductPage.js'),
Icon: path.resolve(__dirname, 'src/Icon/Icon.js'),
},
output: {
path: path.resolve(__dirname, 'dist'),
@rahulrsingh09
rahulrsingh09 / js-tricky-bits.md
Created November 22, 2017 13:19 — forked from amysimmons/js-tricky-bits.md
Understanding closures, callbacks and promises in JavaScript

#Understanding closures, callbacks and promises

For a code newbie like myself, callbacks, closures and promises are scary JavaScript concepts.

10 months into my full-time dev career, and I would struggle to explain these words to a peer.

So I decided it was time to face my fears, and try to get my head around each concept.

Here are the notes from my initial reading. I'll continue to refine them as my understanding improves.

@rahulrsingh09
rahulrsingh09 / viewchild.ts
Created October 21, 2017 07:06
View Child Example
// Shadow DOM - is an internal DOM of your component that is defined by you (as a creator of the component)
// and hidden from an end-user. For example:
@Component({
selector: 'some-component',
template: `
<h1>I am Shadow DOM!</h1>
<h2>Nice to meet you :)</h2>
<ng-content></ng-content>
`;
@rahulrsingh09
rahulrsingh09 / 01.ts
Last active August 3, 2019 09:43 — forked from jhades/01.ts
Angular HTTP
import {HttpClientModule} from '@angular/common/http';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
HttpClientModule
],