Skip to content

Instantly share code, notes, and snippets.

View imixtron's full-sized avatar
🎯
Focusing

Imad Ali Khan Abbasi imixtron

🎯
Focusing
View GitHub Profile
@imixtron
imixtron / README-Template.md
Created February 3, 2020 21:08 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@imixtron
imixtron / gist:6aa077a12ebf9dba3f62c48f8b7e2be3
Created July 17, 2018 10:57 — forked from karlgroves/gist:7544592
Get DOM path of an element
function getDomPath(el) {
var stack = [];
while ( el.parentNode != null ) {
console.log(el.nodeName);
var sibCount = 0;
var sibIndex = 0;
for ( var i = 0; i < el.parentNode.childNodes.length; i++ ) {
var sib = el.parentNode.childNodes[i];
if ( sib.nodeName == el.nodeName ) {
if ( sib === el ) {
@imixtron
imixtron / mongo_backup.sh
Created March 1, 2017 10:54 — forked from sheharyarn/mongo_backup.sh
Mongodump Shell Script for Cronjob
#!/bin/bash
MONGO_DATABASE="your_db_name"
APP_NAME="your_app_name"
MONGO_HOST="127.0.0.1"
MONGO_PORT="27017"
TIMESTAMP=`date +%F-%H%M`
MONGODUMP_PATH="/usr/bin/mongodump"
BACKUPS_DIR="/home/username/backups/$APP_NAME"
@imixtron
imixtron / .block
Created December 30, 2016 08:30 — forked from mbostock/.block
Save SVG as PNG
license: gpl-3.0