Skip to content

Instantly share code, notes, and snippets.

Avatar
👀
I may be slow to respond.

Hamza Hamidi hamzahamidi

👀
I may be slow to respond.
View GitHub Profile
View latest-tag-git.sh
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 Jul 21, 2018
Delete tag locally & remote
View tag-delete.sh
# delete tag locally
git tag -d tagName
# delete tag remote
git push --delete origin tagName
@hamzahamidi
hamzahamidi / angular-cli.sh
Created Jul 24, 2018
default package manager YARN, NPM, CNPM
View angular-cli.sh
# 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 Apr 20, 2019
Git command push subfolder as a branch
View git.sh
git subtree push --prefix dist/bundles origin branch
@hamzahamidi
hamzahamidi / open-cmder-here.md
Last active Aug 9, 2022
"Open Cmder Here" in context menu
View open-cmder-here.md

"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 Mar 27, 2019 — forked from DanDiplo/JS-LINQ.js
JavaScript equivalents of some common C# LINQ methods. To help me remember!
View JS-LINQ.js
// 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 Mar 29, 2019
yarn configuration file
View .yarnrc
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 Apr 1, 2019
Eslint for react-script 2
View .eslintrc.json
{
"extends": ["react-app", "prettier", "prettier/react"],
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true
},
"parserOptions": {
"ecmaVersion": 2017,
View 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
View git-naming-convention.md

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