Skip to content

Instantly share code, notes, and snippets.

View devTeaa's full-sized avatar
🍵
Focusing

devTeaa

🍵
Focusing
View GitHub Profile
@shitchell
shitchell / git-user-stats
Last active October 18, 2025 11:31
Show user stats in a git repo
#!/bin/bash
#
# Show user stats (commits, files modified, insertions, deletions, and total
# lines modified) for a repo
git_log_opts=( "$@" )
git log "${git_log_opts[@]}" --format='author: %ae' --numstat \
| tr '[A-Z]' '[a-z]' \
| grep -v '^$' \
@jonlabelle
jonlabelle / npm_version_cheatsheet.md
Last active October 17, 2025 09:25
npm version cheatsheet

npm uses Semantic Versioning

npm uses Semantic Versioning. Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards compatible manner, and
  3. PATCH version when you make backwards compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format, e.g. 1.0.0-alpha.

@grufffta
grufffta / Navbar.tsx
Created December 1, 2018 12:11
Preact navbar using bulimia example
import { render, h, Component } from 'preact'
import classnames from 'classnames'
import { addClass, getColorStyle } from '../../utils/style-helper'
import { Color } from '../../utils/props'
interface NavbarOwnProps {
id: string
brand?: JSX.Element | string
color?: Color
shadow?: boolean
@mwcz
mwcz / memlog.sh
Created November 8, 2016 03:08
A simple script to create graphs of memory usage of Linux processes.
#!/usr/bin/env bash
# usage: memlog.sh PID
# requires gnuplot and matplotlib (dnf install python2-matplotlib gnuplot)
PID=$1
LOG=./$PID.log
PNG=./$PID.log.png
echo recording memory usage for PID $PID
@eyecatchup
eyecatchup / git-commit-log-stats.md
Last active September 5, 2025 16:04
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@linhmtran168
linhmtran168 / pre-commit-eslint
Last active July 6, 2025 08:17
Pre-commit hook to check for Javascript using ESLint
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$")
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true