Skip to content

Instantly share code, notes, and snippets.

View yoX64's full-sized avatar
🧠
Continuous learning

Werner Banyacskay yoX64

🧠
Continuous learning
View GitHub Profile
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active November 30, 2025 00:48
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
@xeoncross
xeoncross / gitstats.sh
Created November 5, 2012 21:35
Git - calculate how many lines of code were added/changed by someone
# Run this in the project repo from the command-line
# http://stackoverflow.com/a/4593065/99923
git log --shortstat --author "Xeoncross" --since "2 weeks ago" --until "1 week ago" | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}'
@malteo
malteo / gist:1264387
Created October 5, 2011 13:12
How to use Monolog in any PHP file
<?php
spl_autoload_register(function ($class) {
$file = $__DIR__.'/relative/path/to/Monolog/src/'.strtr($class, '\\', '/').'.php';
if (file_exists($file)) {
require $file;
return true;
}
});