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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
fabfile for Django | |
------------------ | |
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/ | |
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle) | |
several additions, corrections and customizations, too |
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
def method_name(param): | |
if param == true: | |
print "success" | |
else: | |
print "failure" |
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
addAll: function () { | |
var tasks = '', view; | |
this.tasks.each(function (task) { | |
view = new TaskView({model: task}); | |
tasks += (view.render().el); | |
}); | |
this.$('#todo-body').append(tasks); | |
} |
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
addAll: function () { | |
var tasks = [], view; | |
this.tasks.each(function (task) { | |
view = new TaskView({model: task}); | |
tasks.push(view.render().el); | |
}); | |
this.$('#todo-body').append(tasks.join('')); | |
} |
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
#!/usr/bin/env python | |
import os | |
for f in os.listdir(os.getcwd()): | |
if os.path.isdir(f): | |
newname = f.replace(u'å', u'a') | |
os.rename(f, newname) |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
for f in os.listdir(os.getcwd()): | |
if os.path.isdir(f): | |
newname = f.replace(u'å', u'a') | |
os.rename(f, newname) |
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
inoremap <expr> <CR> pumvisible() ? | |
\ "\<C-Y>" : delimitMate#WithinEmptyPair() ? | |
\ "\<C-R>=delimitMate#ExpandReturn()\<CR>" : "\<C-G>u\<CR>" | |
" <CR> accepts selected completion menu item (if it's visible) | |
"inoremap <expr> <cr> pumvisible() ? "\<c-y>" : "\<c-g>u\<cr>" | |
" Simulate <down> button | |
inoremap <expr> <c-n> pumvisible() ? "\<lt>c-n>" : "\<lt>c-n>\<lt>c-r>=pumvisible() ? \"\\<lt>down>\" : \"\"\<lt>cr>" |
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
openProject: function(project) { | |
project.tasks.fetch({'success': function (tasks) { | |
mud.app.workspace.taskList.tasks.refresh(tasks.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
addAll: function () { | |
var tasks = [], view; | |
this.tasks.each(function (task) { | |
view = new TaskView({model: task}); | |
tasks.push(view.render().el); | |
}); | |
this.$('#todo-body').append(tasks); | |
} |
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
var sys = require('sys'), | |
http = require('http'), | |
url = require('url'), | |
path = require('path'), | |
fs = require('fs'), | |
events = require('events'); | |
function load_static_file(uri, response) { | |
var filename = path.join(process.cwd(), uri); | |
path.exists(filename, function (exists) { |
OlderNewer