Skip to content

Instantly share code, notes, and snippets.

View anikethsaha's full-sized avatar
🤞
Build | Passing

Anix anikethsaha

🤞
Build | Passing
View GitHub Profile
@anikethsaha
anikethsaha / webpack.config.js
Created May 24, 2018 16:23
this is simple configuration for the serverside and browserside configuration of the webpack to write es6 code .
// project structure
/*
├───node_modules
├───public
│ ├───css
│ │ normalize.css
│ │ skeleton.css
│ │ style.css
│ │
@anikethsaha
anikethsaha / App.js
Last active May 28, 2018 14:16
To create pre-loading of a component in ReactJS using reactJS lifecycle
import React from "react"
import LoadedDiv from './Loaded.js'
import PreLoadDiv from './preload-content.js'
export default class App extends React.Component{
constructor(props){
super(props);
this.state ={ loading : false};
}
componentWillMount(){
@anikethsaha
anikethsaha / config.js
Created June 22, 2018 12:37
Server and packages setup for nodeJS+expressJS server || express.js boilerplate MVC covered with possible most security steps
const bcrypt = require('bcrypt');
module.exports = {
port : 5000,
sessionSecretKey : bcrypt.hashSync("SECRET_KEY", 2)
}
@anikethsaha
anikethsaha / meta-tags.md
Created November 13, 2018 16:33 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@anikethsaha
anikethsaha / adaptive_intent.md
Created October 22, 2019 17:38 — forked from swyxio/adaptive_intent.md
an adaptive, intent based CLI "state machine"

an adaptive, intent based CLI "state machine"

one realization from working on Netlify's CLI is that the CLI framework we used, oclif, didn't provide a great user experience out of the box.

Emphasis on great: it does a lot of nice things, like offering flag and argument parsing, help documentation, and pluggability. That's good for the CLI developer. But what about the CLI user?

  • Idiomatic oclif code often checks for required preconditions, and if it doesn't exist, it prints a warning and then process.exit(1).
  • Decent code prints a helpful warning telling the user what they got wrong. It is informative.
  • Better code offers a prompt, creates a file, or something similar to solve the precondition before proceeding. (possibly recursively). It is intent-based.
  • Great code remembers past inputs to prompts and uses that to offer useful defaults. It is adaptive.
@anikethsaha
anikethsaha / deterministicChunkIdsPlugin.test.js
Created April 5, 2020 11:22
Trying to test deterministicChunkIdsPlugin.test.js
"use strict";
const path = require("path");
const webpack = require("../");
const { createFsFromVolume, Volume } = require("memfs");
const deterministicChunkIdsPlugin = require("../lib/ids/DeterministicChunkIdsPlugin");
describe("deterministic Plugin tests", () => {
jest.setTimeout(20000);
it("should run the chunk ids as a determinitic one", () => {
@anikethsaha
anikethsaha / deterministicChunkIdsPlugin.test.js
Created April 5, 2020 11:22
Trying to test deterministicChunkIdsPlugin.test.js
"use strict";
const path = require("path");
const webpack = require("../");
const { createFsFromVolume, Volume } = require("memfs");
const deterministicChunkIdsPlugin = require("../lib/ids/DeterministicChunkIdsPlugin");
describe("deterministic Plugin tests", () => {
jest.setTimeout(20000);
it("should run the chunk ids as a determinitic one", () => {
@anikethsaha
anikethsaha / deterministicChunkIdsPlugin.test.js
Created April 5, 2020 11:22
Trying to test deterministicChunkIdsPlugin.test.js
"use strict";
const path = require("path");
const webpack = require("../");
const { createFsFromVolume, Volume } = require("memfs");
const deterministicChunkIdsPlugin = require("../lib/ids/DeterministicChunkIdsPlugin");
describe("deterministic Plugin tests", () => {
jest.setTimeout(20000);
it("should run the chunk ids as a determinitic one", () => {
@anikethsaha
anikethsaha / index.html
Created June 21, 2020 11:51
style-perfectionist // source https://jsbin.com/xefixabepo
<!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>style-perfectionist</title>
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.css">