Skip to content

Instantly share code, notes, and snippets.

@pombadev
Last active February 14, 2017 15:58
Show Gist options
  • Save pombadev/f5177188f98d6960c4faa0540ddc72b5 to your computer and use it in GitHub Desktop.
Save pombadev/f5177188f98d6960c4faa0540ddc72b5 to your computer and use it in GitHub Desktop.
Tiny everyday hacks i found useful.

Better Git Blame ??

Credits: @andrewray
URL: http://blog.andrewray.me/

git log -p -M --follow --stat -- /path/to/file/name

Better Git Log

Credits: @filipekiss
URL: https://coderwall.com/

git log -p --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

Date of a commit

git show -s --format=%ci <commithash>

Deep clone an array (Native JavaScript)

JSON.parse(JSON.stringify(oldDeepNestedArray))

Comments in MarkDown

Credits: @Magnus
Url: stackoverflow

[//]: # (This may be the most platform independent comment)

Find and execute your command

find ./ -type f -name "*.mobi" -exec cp {} /path/t/ \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment