Skip to content

Instantly share code, notes, and snippets.

View afaqahmedkhan's full-sized avatar
🏠
Working from home

Afaq Ahmed Khan afaqahmedkhan

🏠
Working from home
View GitHub Profile
@mathewbyrne
mathewbyrne / slugify.js
Created October 12, 2011 04:34
Javascript Slugify
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
@bigfox
bigfox / git_commit_count
Last active March 31, 2025 12:45
Git - number of commits by author (exclude merge commits)
git shortlog -s -n --all --no-merges