Skip to content

Instantly share code, notes, and snippets.

View hamzahamidi's full-sized avatar
👀
I may be slow to respond.

Hamza Hamidi hamzahamidi

👀
I may be slow to respond.
View GitHub Profile
@hamzahamidi
hamzahamidi / detect-js-framework.js
Created June 29, 2019 12:42 — forked from rambabusaravanan/detect-js-framework.js
Detect JS Framework used in a Website
// Pase these lines into website's console ( Ctrl/Cmd + Shift + I )
if(!!window.React ||
!!document.querySelector('[data-reactroot], [data-reactid]'))
console.log('React.js');
if(!!window.angular ||
!!document.querySelector('.ng-binding, [ng-app], [data-ng-app], [ng-controller], [data-ng-controller], [ng-repeat], [data-ng-repeat]') ||
!!document.querySelector('script[src*="angular.js"], script[src*="angular.min.js"]'))
console.log('Angular.js');
// script to enable webpack-bundle-analyzer
process.env.NODE_ENV = 'production';
const webpack = require('webpack');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin;
const webpackConfigProd = require('react-scripts/config/webpack.config')('production');
webpackConfigProd.plugins.push(new BundleAnalyzerPlugin());
// actually running compilation and waiting for plugin to start explorer
// script to enable webpack-bundle-analyzer
process.env.NODE_ENV = 'production';
const webpack = require('webpack');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin;
const webpackConfigProd = require('react-scripts/config/webpack.config.prod');
webpackConfigProd.plugins.push(new BundleAnalyzerPlugin());
// actually running compilation and waiting for plugin to start explorer
@hamzahamidi
hamzahamidi / git-naming-convention.md
Created June 22, 2019 22:36
Git naming convention

Git Naming Convention

Type

Must be one of the following:

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (example scopes: Circle, BrowserStack, SauceLabs)
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
@hamzahamidi
hamzahamidi / vscode-extensions.list
Created April 20, 2019 17:19
vscode extensions list
$ cd ~/.vscode/extensions
alexkrechik.cucumberautocomplete-2.13.1
dbaeumer.vscode-eslint-1.8.2
donjayamanne.githistory-0.4.6
eamodio.gitlens-9.6.2
ecmel.vscode-html-css-0.2.0
eg2.tslint-1.0.43
esbenp.prettier-vscode-1.8.1
hookyqr.beautify-1.4.11
@hamzahamidi
hamzahamidi / .eslintrc.json
Created April 1, 2019 10:23
Eslint for react-script 2
{
"extends": ["react-app", "prettier", "prettier/react"],
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true
},
"parserOptions": {
"ecmaVersion": 2017,
@hamzahamidi
hamzahamidi / .yarnrc
Created March 29, 2019 15:40
yarn configuration file
registry "registry"
save-prefix "save-prefix"
ignore-scripts "ignore-scripts"
ignore-platform "ignore-platform"
ignore-engines "ignore-engines"
ignore-optional "ignore-optional"
force "force"
disable-self-update-check "disable-self-update-check"
lastUpdateCheck "lastUpdateCheck"
name "init-author-name"
@hamzahamidi
hamzahamidi / JS-LINQ.js
Created March 27, 2019 08:40 — forked from DanDiplo/JS-LINQ.js
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
{ name: "Judy", age: 42 },
{ name: "Tim", age: 8 }
@hamzahamidi
hamzahamidi / open-cmder-here.md
Last active February 23, 2024 01:30
"Open Cmder Here" in context menu

"Open Cmder Here" in context menu

Edit 04/2021:

As of the lastest versions, just execute the following command .\cmder.exe /REGISTER ALL per Documentation.

Original Solution

To add an entry in the Windows Explorer context menu to open Cmder in a specific directory, paste this into a OpenCmderHere.reg file and double-click to install it.

@hamzahamidi
hamzahamidi / git.sh
Last active April 20, 2019 17:16
Git command push subfolder as a branch
git subtree push --prefix dist/bundles origin branch