Skip to content

Instantly share code, notes, and snippets.

View o0pmitev's full-sized avatar
👾
alt='Image of a space invader'

Plamen Mitev o0pmitev

👾
alt='Image of a space invader'
View GitHub Profile
@o0pmitev
o0pmitev / git-fetch-rebase-workf.txt
Created March 17, 2023 16:19 — forked from programaker/git-fetch-rebase-workf.txt
A simple Fetch/Rebase git workflow
/*** Git configuration in eclipse ***/
/* Setup */
- In Preferences > Team > Git > Label Decorations > Icon Decorations => check all
- In Git perspective > Synchronize button > Synchronize => synchronize git destination .../origin/master
- In Preferences > Team > Perspective => Change "Team Synchronize" to "Git"
/*************************************************************************************************/
@o0pmitev
o0pmitev / helpers.js
Last active February 1, 2024 04:58
helpers
/**
* @description Gets the coordinates of the mouse click on given element (x, y)
* @param {string} elementClass class name of the element
*/
function getElementClickOriginPoint(elementClass) {
document.querySelector(`.${elementClass}`).onclick = function(e) {
var rect = e.target.getBoundingClientRect();
var x = e.clientX - rect.left; // x position within the element.
var y = e.clientY - rect.top; // y position within the element.
console.log(x, y);