(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
from django.core.files.uploadhandler import TemporaryFileUploadHandler | |
from django.core.files.base import File | |
from dropbox.client import DropboxClient | |
from dropbox.session import DropboxSession | |
from django.conf import settings | |
import os | |
class DropboxFileUploadHandler(TemporaryFileUploadHandler): | |
def __init__(self, *args, **kwargs): | |
super(DropboxFileUploadHandler, self).__init__(*args, **kwargs) |
// This script sets OSName variable as follows: | |
// "Windows" for all versions of Windows | |
// "MacOS" for all versions of Macintosh OS | |
// "Linux" for all versions of Linux | |
// "UNIX" for all other UNIX flavors | |
// "Unknown OS" indicates failure to detect the OS | |
var OSName="Unknown OS"; | |
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows"; | |
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS"; |
/* | |
* Use this to turn on logging: (in your local extensions file) | |
*/ | |
Handlebars.logger.log = function(level) { | |
if(level >= Handlebars.logger.level) { | |
console.log.apply(console, [].concat(["Handlebars: "], _.toArray(arguments))); | |
} | |
}; | |
// DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, |
import simplejson | |
import json | |
def put(data, filename): | |
try: | |
jsondata = simplejson.dumps(data, indent=4, skipkeys=True, sort_keys=True) | |
fd = open(filename, 'w') | |
fd.write(jsondata) | |
fd.close() | |
except: |
class Table(Base): | |
id = Column(Integer, primary_key=True) | |
_name = Column('name', String(24)) | |
@property | |
def name(self): | |
return self._name; | |
@name.setter | |
def name(self, value): |
(function () { | |
var TestView = Backbone.View.extend({ | |
el: '#container', | |
initialize: function () { | |
console.log('Inside Init'); | |
JavaScript Code
var str = "hi";
Memory allocation:
Address | Value | Description |
---|---|---|
...... |
... |
var request = require('supertest'), | |
should = require('should'), | |
app = require('../server'); | |
var Cookies; | |
describe('Functional Test <Sessions>:', function () { | |
it('should create user session for valid user', function (done) { | |
request(app) | |
.post('/v1/sessions') |