Skip to content

Instantly share code, notes, and snippets.

@sangelov
sangelov / fix-git-commit-email.sh
Last active March 27, 2017 20:30
The script fixes changes the author email of all commits
git filter-branch --env-filter '
OLD_EMAIL="OLD_EMAIL"
CORRECT_NAME="AUTHOR_NAME"
CORRECT_EMAIL="NEW_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
@sangelov
sangelov / JustCode comparison warning
Created February 6, 2015 17:20
A JustCode extension that adds a warning for < > <= >= between double/float
using System.Collections.Generic;
using System.ComponentModel.Composition;
using Telerik.JustCode.CommonLanguageModel;
namespace JustCodeExtension3
{
[Export(typeof(IEngineModule))]
[Export(typeof(ICodeMarkerGroupDefinition))]
public class WarningExample : CodeMarkerProviderModuleBase
{
@sangelov
sangelov / JustCode empty catch block
Created August 21, 2014 06:55
JustCode warning for catch clauses with empty blocks
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using Telerik.JustCode.CommonLanguageModel;
namespace JustCodeExtension1
{
[Export(typeof(IEngineModule))]
[Export(typeof(ICodeMarkerGroupDefinition))]
public class WarningExample : CodeMarkerProviderModuleBase