Skip to content

Instantly share code, notes, and snippets.

@yood
yood / SetBundleVersionToGitCommitHash.sh
Created June 18, 2010 20:06
Set bundle version to git commit hash
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion `/usr/local/git/bin/git rev-parse --short HEAD`" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
@yood
yood / gist:2414047
Created April 18, 2012 14:46
Modify mogenerator header template for transformable NSRange attribute
diff --git a/misc/machine.h.motemplate b/misc/machine.h.motemplate
index 4715701..9c51a9a 100644
--- a/misc/machine.h.motemplate
+++ b/misc/machine.h.motemplate
@@ -5,7 +5,7 @@
<$if hasCustomSuperentity$>#import "<$customSuperentity$>.h"<$endif$>
<$foreach Relationship noninheritedRelationships do$>@class <$Relationship.destinationEntity.managedObjectClassName$>;
<$endforeach do$>
-<$foreach Attribute noninheritedAttributes do$><$if Attribute.hasTransformableAttributeType$>@class <$Attribute.objectAttributeType$>;<$endif$>
+<$foreach Attribute noninheritedAttributes do$><$if Attribute.hasTransformableAttributeType && Attribute.objectAttributeClassName != "NSRange" $>@class <$Attribute.objectAttributeClassName$>;<$endif$>
@yood
yood / gist:2636722
Created May 8, 2012 16:04
Colors in terminal
export CLICOLOR=1
export LSCOLORS='ExfxcxdxbxEgEdabagacad'