Skip to content

Instantly share code, notes, and snippets.

View shobishani's full-sized avatar

Adil Mehmood shobishani

  • Lahore, Pakistan
View GitHub Profile
const CleanWebpackPlugin = require('clean-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const StyleLintPlugin = require('stylelint-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const merge = require('webpack-merge');
const common = require('./webpack.common.config');
const path = require('path');
const SpeedMeasurePlugin = require("speed-measure-webpack-plugin");
const { CheckerPlugin } = require('awesome-typescript-loader');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
const {
NamedModulesPlugin,
} = require('webpack');
const {
module: {
rules: [
{
test: /\.tsx?$/,
exclude: /node_modules/,
loader: 'tslint-loader',
enforce: 'pre',
options: {
configFile: PATHS.configs.tslint,
emitErrors: true,
private checkIntersection() {
const alreadyChecked: number[][] = [];
for (let i = 0; i < this._polyLines.length; i += 1) {
for (let j = 0; j < this._polyLines.length; j += 1) {
if (i === j) continue;
const isAlreadyCompared: number[] | undefined = alreadyChecked.find((item: number[]) => {
return isEqual(sortBy(item, Number), sortBy([j, i], Number));
});
if (isAlreadyCompared && isAlreadyCompared.length) continue;
alreadyChecked.push([i, j]);
@shobishani
shobishani / pak-india-war-react-component.js
Created February 27, 2019 21:40
Pakistan and India never stoppable war
import React,{Component} from 'react';
import _ from 'lodash';
class Tension extends Component{
state = {
nations: {
pakistan: {
isResponding: false
},