Skip to content

Instantly share code, notes, and snippets.

View enqtran's full-sized avatar

enqtran enqtran

View GitHub Profile
.scroller {
height: 300px;
overflow-y: scroll;
scroll-snap-type: y mandatory;
scroll-padding-top: 40px;
}
.scroller section {
scroll-snap-align: start;
}
Bootstrap
Materialize CSS
Ant Design
Semantic UI
Bulma
Foundation
UIKit
Tachyons
Primer
Tailwind
1. Strong type checks
Use === instead of ==
2. Variables
3. Functions
4. Conditionals
Avoid negative conditionals.
hlsDefaultConfig = {
autoStartLoad: !0,
startPosition: -1,
defaultAudioCodec: void 0,
debug: !1,
capLevelOnFPSDrop: !1,
capLevelToPlayerSize: !1,
initialLiveManifestSize: 1,
maxBufferLength: 30,
maxBufferSize: 6e7,
* Google Docs Viewer
- Only files under 25 MB can be previewed with the Google Drive viewer.
- Google Drive viewer helps you preview over 16 different file types, listed below:
+ Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
+ Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
+ Text files (.TXT)
+ Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
+ Microsoft Word (.DOC and .DOCX)
+ Microsoft Excel (.XLS and .XLSX)
+ Microsoft PowerPoint (.PPT and .PPTX)
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-title" content=""/>
<meta name="copyright" content=""/>
<meta name="author" content=""/>
// schema
<script type="application/ld+json">
{
"@context": "http://schema.org",
<meta http-equiv="x-dns-prefetch-control" content="on">
<link rel="dns-prefetch" href="//cdn.jwplayer.com"/>
<link rel="dns-prefetch" href="//fonts.googleapis.com"/>
<link rel="dns-prefetch" href="//www.google-analytics.com"/>
<link rel="dns-prefetch" href="//www.googletagmanager.com"/>
<link rel="dns-prefetch" href="//fcm.googleapis.com">
<link rel="dns-prefetch" href="//connect.facebook.net"/>
chrome://webrtc-internals/
https://webrtc.github.io/samples/src/content/peerconnection/restart-ice/
Developer tools
chrome://webrtc-internals
opera://webrtc-internals
about:webrtc
1. Use debounce
_.debounce(value => this.props.onChange(value), 300);
2. Brunch
# If you use npm
npm install --save-dev uglify-js-brunch
# If you use Yarn
yarn add --dev uglify-js-brunch
Then, to create a production build, add the -p flag to the build command:
'playlist': '/images/stories/video/playlist_hd2.xml',
'playlist.position': 'none',
'height': '400',
'width': '685',
'wmode': 'opaque',
'abouttext': 'JW Player Plugin Advanced',
'aboutlink': 'http://www.joomlarulez.com/example-jw-player-plugin.html',
'playbackRateControls': 'true',
'advertising': {
'client': 'vast',