The mvim file is usually not writeable, change that:
sudo chmod u+w `which mvim`
Now open it for editing:
sudo vim `which mvim`
Add the following line to the top of the file, below the commented section:
| from testrunner import describe, it, before, after | |
| import MyClass | |
| with describe("My class can add"): | |
| with before: | |
| c = MyClass() | |
| with after: | |
| "clean up goes here" |
| @echo off | |
| rem Windows Driver script for Konira | |
| setlocal | |
| rem Use a full path to Python (relative to this script) as the standard Python | |
| rem install does not put python.exe on the PATH... | |
| rem %~dp0 is the directory of this script | |
| python "%~dp0konira" %* |
| # The web server: | |
| import SimpleHTTPServer | |
| import SocketServer | |
| PORT = 8000 | |
| Handler = SimpleHTTPServer.SimpleHTTPRequestHandler | |
| httpd = SocketServer.TCPServer(("", PORT), Handler) |
| FOO = None | |
| def set_or_return(): | |
| if FOO: | |
| return FOO # local variable 'FOO' (defined in enclosing scope in line 1) referenced before assignment | |
| try: | |
| FOO = True | |
| except: | |
| FOO = False | |
| return FOO |
| # Getting mosh to work in OSX | |
| # On the client /etc/ssh_config : | |
| SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES | |
| SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT | |
| SendEnv LC_IDENTIFICATION LC_ALL LANGUAGE | |
| # And on the server, in /etc/ssh/sshd_config : |
The mvim file is usually not writeable, change that:
sudo chmod u+w `which mvim`
Now open it for editing:
sudo vim `which mvim`
Add the following line to the top of the file, below the commented section:
| import os | |
| curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) | |
| import cherrypy | |
| from cherrypy.test import helper | |
| class RoutesDispatchTest(helper.CPWebCase): |
| #!/bin/bash | |
| set -e | |
| app=$1 | |
| if [ $2 ]; then | |
| window=$2 | |
| else | |
| window=1 |
| #!/bin/sh | |
| # this file should be marked as executable and placed on .git/hooks/ | |
| BRANCH_NAME=$(git branch 2>/dev/null | grep -e ^* | tr -d ' *') | |
| # FogBugz | |
| if [[ $BRANCH_NAME =~ ^case ]]; then | |
| CASE_NUMBER=$(echo $BRANCH_NAME 2>/dev/null | tr -d "case" | tr -d "-" | tr -d "_") | |
| echo "[case $CASE_NUMBER] $(cat $1)" > $1 |
| function! PyVersion() | |
| let out = system("python --version") | |
| " Match on the first digit, fallback to 2 if nothing found | |
| let major_version = get(matchlist(out, '\d'), 0, '2') | |
| echo "This is Python version " . major_version | |
| endfunction |