Skip to content

Instantly share code, notes, and snippets.

View vigzmv's full-sized avatar

Vignesh M vigzmv

View GitHub Profile

Keybase proof

I hereby claim:

  • I am vigzmv on github.

  • I am vigzmv (https://keybase.io/vigzmv) on keybase.

  • I have a public key ASAnjMifrMUboYuDtf6WVxe-POz-f9WiZk8NerUYFzQ0wwo

@vigzmv
vigzmv / perf.js
Created February 15, 2019 05:50
Client Performance Logging
const {
domLoading,
domComplete,
domInteractive,
domContentLoadedEventStart
} = window.performance.timing;
const tti = domInteractive - domLoading;
const dcl = domContentLoadedEventStart - domLoading;
const complete = domComplete - domLoading;
@vigzmv
vigzmv / urls.md
Created January 16, 2019 16:33
URLs 1min crash course

Take example, this is a complete URL: https://novelship.co/filter?brands=36&page=1&tags=fw18,sup

Everything before the ? is the PATH. Paths refer a PAGE or RESOURCE, Page like filter page. Resource can be users, brands Everything after the ? is the QUERY. Query is used to send some extra info to that PAGE or RESOURCE.

We use these queries to do the filtering, like brand=36 filters the brand Each filter is separated by a &

@vigzmv
vigzmv / .babelrc
Last active March 30, 2018 10:54
_js-configs
{
"presets": ["env", "react", "babel-preset-stage-2"]
}
@vigzmv
vigzmv / index.html
Created December 16, 2017 20:04
react-parcel-example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>React-Parcel-Example</title>
</head>
@vigzmv
vigzmv / ExampleApp.js
Created December 16, 2017 20:03
react-parcel-example Raw
import React, { Component } from 'react';
import './ExampleApp.css';
class ExampleApp extends Component {
render() {
return (
<div className="App">
<img
className="App-Logo"
@vigzmv
vigzmv / ExampleApp.css
Created December 16, 2017 20:03
react-parcel-example
body {
margin: 0;
padding: 0;
font-family: Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.App {
text-align: center;
margin: 2rem auto;
}
@vigzmv
vigzmv / index.js
Last active December 20, 2017 13:28
react-parcel-example
import React from 'react';
import ReactDOM from 'react-dom';
import ExampleApp from './ExampleApp';
ReactDOM.render(<ExampleApp />, document.getElementById('root'));
@vigzmv
vigzmv / requirements.md
Last active January 14, 2018 09:20
Into the React - Requirements

Please make sure you have the following requirements installed on your systems before the event.

1. Chrome: Latest or at least > 62

Get Chrome

2. Node: Latest or at least > 9.2 and (npm > 5.5 and/or yarn > 1.3)

Get Node

Check your node version

@vigzmv
vigzmv / egghead-video-download.md
Last active December 7, 2017 09:45
Download videos from egghead.io
  1. Install youtube-dl from here.
  2. Install ffmpeg from here
  3. To download a course with best video/audio quality and a format of 00001-Introduction_to_The_Beginner_s_Guide_to_ReactJS.mp4

youtube-dl -cio '%(autonumber)s-%(title)s.%(ext)s' -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' <Course URL> --restrict-filenames

Replace Course Url with egghead url. Example:

youtube-dl -cio '%(autonumber)s-%(title)s.%(ext)s' -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' https://egghead.io/courses/the-beginner-s-guide-to-reactjs --restrict-filenames