Skip to content

Instantly share code, notes, and snippets.

@ziggi
ziggi / parents.js
Last active August 11, 2022 16:10
Vanilla JS jQuery.parents() realisation (npm module: https://github.com/ziggi/dom-parents)
Element.prototype.parents = function(selector) {
var elements = [];
var elem = this;
var ishaveselector = selector !== undefined;
while ((elem = elem.parentElement) !== null) {
if (elem.nodeType !== Node.ELEMENT_NODE) {
continue;
}
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active August 20, 2026 08:52
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@kasparsd
kasparsd / wordpress-plugin-svn-to-git.md
Last active June 2, 2025 17:14
Using Git with Subversion Mirroring for WordPress Plugin Development
@yoshimov
yoshimov / gist:2146576
Created March 21, 2012 12:21
Bookmarklet to create QR code for current page.
javascript:(function(){var l=window.location.href;void(window.open('https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl='+l,'_blank'));})()