This file contains hidden or 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
import netsvc | |
logger = netsvc.Logger() | |
class Logger(object): | |
"""Provide an API similar to the standard 'logging' module.""" | |
__slots__ = ('name',) | |
def __init__(self, name): |
This file contains hidden or 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
Xcode 4 custom snippet | |
If you want to make your own custom snippets with in preview version of Xcode 4 and do not want to wait for the function to be implemented here is the way : | |
Open the folder ~/Library/Developer/Xcode/UserData/CodeSnippets | |
Create a file named my_nice_file.codesnippet (one file per snippet) | |
It should look like this : http://gist.github.com/521183 | |
There is only one rule to respect : |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>IDECodeSnippetCompletionPrefix</key> | |
<string></string> | |
<key>IDECodeSnippetContents</key> | |
<string>class <#MyClass#>(osv.osv): | |
" <#DOCString#>" | |
#_name="My name" |
NewerOlder