Skip to content

Instantly share code, notes, and snippets.

View 4leem's full-sized avatar

Aleem 4leem

View GitHub Profile
@4leem
4leem / validateXML
Created June 24, 2020 05:21
Validate XML with JavaScript code
var xt = "", h3OK = 1;
function checkErrorXML(x) {
xt = "";
h3OK = 1;
checkXML(x);
}
function checkXML(n) {
var l, i, nam;
nam = n.nodeName;
*Do you want to request a **feature** or report a **bug**?*
*What is the current behavior?*
*If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.*
*What is the expected behavior?*
*Which browser / OS are affected by this issue? What is the version?*
@4leem
4leem / update-fork.md
Created March 23, 2017 06:47
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@4leem
4leem / count_total_project_code_lines_in_sublime
Last active February 16, 2017 09:26 — forked from Hexodus/count_total_project_code_lines_in_sublime
Count total code lines in project using Sublime texteditor
// Go to menu:
// find->find in files
// Switch on reg_ex button [.*]
// Find:
^(.*)$
// Where:
c:\your_folder\,*.php,*.phtml,*.js,*.inc,*.html, -*/folder_to_exclude/*
// Then click on the find button
// Be careful to not click on Replace!!!