This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This example is a variation on the code posted by Dave Abrahams at: | |
// https://gist.github.com/1528856. | |
#include <iostream> | |
template <typename Tag> | |
typename Tag::type saved_private_v; | |
template <typename Tag, typename Tag::type x> | |
bool save_private_v = (saved_private_v<Tag> = x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Do Not Commit' subversion pre-commit hook. | |
Concept. Sometimes to accelerate development I change production code from "const int CooldownMls = 5000;" to "const int CooldownMls = 0; // dnc" | |
Another example can be hardcoding db url to localhost like: $conn = createConn('127.1'); // dnc | |
Notice 'dnc' tag. It prevents the file from accidental commit. My svn repo rejects text files with such tag inside. | |
Installation. | |
1. Copy files to $REPOS/hooks | |
3. Then chmod +x both. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################### | |
# .gitignore file for Xcode4 and Xcode5 Source projects | |
# | |
# Apple bugs, waiting for Apple to fix/respond: | |
# | |
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
# | |
# Version 2.6 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
// This is a rewrite and analysis of the technique in this article: | |
// http://bloglitb.blogspot.com/2010/07/access-to-private-members-thats-easy.html | |
// ------- Framework ------- | |
// The little library required to work this magic | |
// Generate a static data member of type Tag::type in which to store | |
// the address of a private member. It is crucial that Tag does not |