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
github_repo="https://github.com/repo/repo.git"
TAGS=$(git ls-remote --refs --tags ${github_repo} | awk -F/ '{ print $3 }' | awk '{print $NF}')
LATEST_TAG=$(echo $TAGS | awk '{print $(NF-1)}')
echo $LATEST_TAG
@hamzahamidi
hamzahamidi / tag-delete.sh
Created July 21, 2018 16:56
Delete tag locally & remote
# delete tag locally
git tag -d tagName
# delete tag remote
git push --delete origin tagName
@hamzahamidi
hamzahamidi / angular-cli.sh
Created July 24, 2018 07:54
default package manager YARN, NPM, CNPM
# make YARN default
ng config -g cli.packageManager yarn
# make CNPM default
ng config -g cli.packageManager cnpm
# make NPM default
ng config -g cli.packageManager npm
@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
@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 / 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 / .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 / .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 / 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 / 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