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
from fabric.api import * | |
from fabric.contrib import project as project | |
SYNC_DIR = 'MY_DIRECTORY' | |
def push(): | |
local('rsync -avz --exclude fabfile.py --exclude fabfile.pyc . %s' % SYNC_DIR) | |
def pull(): | |
local('rsync -avz --exclude fabfile.py --exclude fabfile.pyc %s .' % SYNC_DIR) |
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
G 8 O . wrfles (D anmes nouns | |
\3H?m, iegui, 2\_2 Ewing‘? 1 u§: E2 ;~f¢u?~ | |
1>>>>>>>>>>>> _ | |
\‘\\1\,u\;\;\_ | |
4c'\a1 | |
A Bad Ha VCJ | |
ACarCras'\ | |
AC'\eaa Molefl | |
A Fmflre | |
A F.HMoo1 |
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
## {{{ http://code.activestate.com/recipes/68205/ (r1) | |
#!/user/bin/env python | |
"""null.py | |
This is a sample implementation of the 'Null Object' design pattern. | |
Roughly, the goal with Null objects is to provide an 'intelligent' | |
replacement for the often used primitive data type None in Python or | |
Null (or Null pointers) in other languages. These are used for many |
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
echo 'fef15b2286372c87679fcbd9a38b9e6f0a740765 | |
2ce3225d49680b7e64a83eb75229ebed8da33c74 | |
045e7e049c22c186de21eb719417f713062250ae | |
9f5e6fc83bd9a28800180d7540c7f7f7f10e6c38 | |
a0de8e3fc009851dda39c82d2aeba6499a7e3bf9 | |
b80e4c0599beb28b93dd3b56414993024eb2c7c6 4b6e941673093657b7e751e3282d6ea155e54c5d | |
77978e50d2f57061f0a76803f9ec91513e2122f0 | |
a47c4071ec93cb848c9d23aba77a6b4df9d0100a | |
78219d437a5e7b34d43e1fc62b96b8a87b3e32cf' | xargs git show --pretty="format:" --name-only | uniq |
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
- (NSMutableSet *)recurIntoView:(UIView *)v { | |
NSMutableSet *s = [NSMutableSet set]; | |
for (UIView *sv in v.subviews) { | |
[s addObject:[NSNumber numberWithInt:sv.tag]]; | |
[s unionSet:[self recurIntoView:sv]]; | |
} | |
return s; | |
} |
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
(function () { | |
var body = document.getElementsByTagName("body")[0]; | |
var bg = document.createElement("div"); | |
bg.setAttribute("style", "position: absolute; z-index: 1000; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, 0.5)"); | |
var form = document.createElement("div"); | |
form.setAttribute("style", "margin: 0 auto; height: 100%; width: 800px; padding: 50px; background: rgb(200, 200, 220);"); | |
form.appendChild(document.createTextNode("Board: ")); | |
var list_select = document.createElement("select"); | |
var lists = boardView.model.listList.models; |
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
find . -type f -name '*.[hm]' -exec cat {} \; | sed '/^\s*#/d;/^\s*$/d;/^\s*\/\//d' | wc -l |
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
function makeStruct(names) { | |
var names = names.split(' '); | |
var count = names.length; | |
function constructor() { | |
for (var i = 0; i < count; i++) { | |
this[names[i]] = arguments[i]; | |
} | |
} | |
return constructor; | |
} |
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
Easy Way to Debug UIView Hierarchy | |
Do you want to see complete view hierarchy for debugging purposes? There is an easy way to do it, provided by Apple - totally unofficially! | |
Actually official documentation says it's undocumented and not supported. No problem with that. Very kind of Apple, good developer service! | |
Found this in Technical Note TN2239 "iOS Debugging Magic", section "Cocoa and Cocoa Touch - UIKit": | |
UIView implements a useful description method. In addition, it implements a recursiveDescription method that you can call to get a summary of an entire view hierarchy. | |
Therefore I could have saved lots of time and effort in How to Find MFMailComposeViewController Email Addresses with a single line of code. Just to verify that it's not possioble to find recipient email addresses by digging deep into view hierarchy I could have used this: | |
NSLog(@"%@", [controller.view recursiveDescription]); |
NewerOlder