Skip to content

Instantly share code, notes, and snippets.

@SimplyInk
SimplyInk / gitcheats.txt
Created June 29, 2020 02:49 — forked from chrismccoy/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# pretty tab'd git log
git log --graph --pretty="tformat:%h*(%ar)*<%an>*%d %s" $* | sed -Ee 's/(^[^<]*) ago\)/\1)/' | sed -Ee 's/(^[^<]*), [[:digit:]]+ .*months?\)/\1)/' | column -s '*' -t | cat
# change author of all git repos
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='yourname'; GIT_AUTHOR_EMAIL='youremail@example.com'; GIT_COMMITTER_NAME='yourname'; GIT_COMMITTER_EMAIL='youremail@example.com';" HEAD;
# stage only deleted files
@SimplyInk
SimplyInk / delete_git_submodule.md
Created June 3, 2020 11:21 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@SimplyInk
SimplyInk / sampleREADME.md
Created June 3, 2020 03:11 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

@SimplyInk
SimplyInk / Boilerpalte.ps1
Created September 16, 2019 07:26 — forked from maxfunke/Boilerpalte.ps1
Boilerplate for powershell scripts
#Requires -Version 3
<#
.SYNOPSIS
<Overview of script>
.DESCRIPTION
<Brief description of script>
.PARAMETER <Parameter_Name>
<Brief description of parameter input required. Repeat this attribute if required>
.INPUTS
<Inputs if any, otherwise state None>
@SimplyInk
SimplyInk / log-color
Last active February 10, 2017 09:57 — forked from jdanbrown/log-color
log4j logs in color!
#!/bin/bash -eu
#
# Color log4j-style logs for easier visual parsing.
#
# Usage:
# put this file in /usr/local/bin
# chmod +x log-color
# tail foo.log | log-color
black="`tput setaf 0; tput bold`"